#K81752. String Rotations

    ID: 35823 Type: Default 1000ms 256MiB

String Rotations

String Rotations

Given a string s, generate and print all of its rotations. A rotation is obtained by moving the first i characters of the string to the end, for i from 0 to n-1, where n is the length of the string.

For example, if s = "rotation", the rotations are:

  • rotation
  • otationr
  • tationro
  • ationrot
  • tionrota
  • ionrotat
  • onrotati
  • nrotatio

The input string consists of printable ASCII characters and has a length between 1 and 100.

inputFormat

The input consists of a single line containing the string s.

outputFormat

Output all rotations of the string, each on a separate line, in the same order as described in the problem statement.

## sample
rotation
rotation

otationr tationro ationrot tionrota ionrotat onrotati nrotatio

</p>