f=lambda:int(input()) N,A,c,p=f()-1,f(),1,print for _ in'1'*N:p(c);c+=f()>A p(c)