enum A{A;System z;String a=new java.util.Scanner(z.in).nextLine().toUpperCase();int i,l=a.length();{for(;l>0;)z.out.print((a+a).charAt(i+i++/l)+(i<l?" ":"\n"));}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).