#WA解答 N,M=map(int,input().split()) A=[] while M: q,r=divmod(N,M) A.append(q) N,M=M,r print(*[1]*len(A))