n,o;main(t){for(scanf("%d",&o);putchar(n%~-o>t-o?o-++t>n%~-o?32:42:10)%5||(t=++n