Problem Description

A string s is provided. Consider all rotations of s. Output the lexicographically smallest rotation.

Input Format

One line s.

Output Format

One line smallest rotation.

Sample Test Case

Input:
bba
Output:
abb

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next