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