public static void main(String[] args) throws Exception{
InputStream is = System.in;
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String s = br.readLine();
char[] c = s.toCharArray();
String[] sa = new String[c.length];
ArrayList<String> al = new ArrayList<String>();
for (int i = 0; i < sa.length; i++) {
sa = String.valueOf(c.clone());
al.add(sa);
}
while(al.get(al.size()-1).length()!=sa.length){
ArrayList<String> al2 = new ArrayList<String>();
for (int i = 0; i < sa.length; i++) {
String s2;