Next Lexicographically Greater Substring

Problem Name:
Next Lexicographically Greater Substring
Site:Spoj
Links:
Tags:
Problem setters: