Lexicographic Rows

Problem Name:
Lexicographic Rows
Site:HackerEarth
Links:
Tags:
Problem setters: