i;main(j,b){for(i=-b%3*30;~i--;j=puts(""))for(;j<31;)putchar("apple*"[(b=(i+j++)%30)>5?5:b]);}