import std.stdio;void main(){int j,n,m;for(scanf("%d",&n);~n;putchar=j>30?j=!n--,10:"apple*"[m<5?m:5])m=(n+j++)%30;}