A lexicographically-smallest string

Problem Name:
A lexicographically-smallest string
Site:HackerEarth
Links:
Tags: