import math a,p=map(int,raw_input().split()) t=-1e-5 exec'print" "*int(math.sin(t)*a+a)+" *";t+=6.283/p;'*2*p