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