N,M=map(int,input().split()) Q=[list(map(int,input().split())) for i in range(M)] print([1]*N)