class A{public static void main(String[]a)throws Exception{String s="";for(int c;(c=System.in.read())>0;)if(c<11){System.out.println(s+"\n"+s);s="";}else s+=(char)c;}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).