L,R,M=map(int,input().split()) f,b,a,i=2,1,0,3 while (iL+1),i+1 print(a%M)