class h{public static void main(String[]a)throws Exception{String o="";int z,w=10*(System.in.read()-48);for(int x=0;x++<w+1;){for(int i=0;i++<30;){z=(60-x+i)%30;o+=z>4?"*":"apple".charAt(z);}o+='\n';}System.out.print(o);}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).