SP25959 NEXTLEX - Next Lexicographically Greater Substring

Description

Consider a string S, consisting of only lowercase alphabets.

Input Format

N/A

Output Format

Output the answer for each query in a new line.