
import java.io.BufferedReader;
import java.io.InputStreamReader;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author LH
 */
public class ShiftAll
{
    public static void main(String[] args) throws Exception //unfein; amchs nur wegen ihrer doofen limitierung
    {
        
        //System.out.println("dbg1");
        BufferedReader kb = new BufferedReader(new InputStreamReader(System.in));
        //System.out.println("dbg2");
        
        //System.out.print()
        System.out.print("Bitte einen Text eingeben:");
        String line = kb.readLine();
        while(line!=null)
        {
            int shiftmax = line.length();
            int i = 0;
            while(i<=shiftmax)
            {
                System.out.println(line);
                line = shift(line);
                i=i+1; //i++
            }
            System.out.print("Bitte einen Text eingeben:");
            line = kb.readLine();
        }
    }
    
    public static String shift(String in)
    {
        return in.length() < 2 ? in : in.substring(1) + in.substring(0, 1);
    }
}
