N, K = map(int, input().split())
list = [int(input()) for _ in range(N)]
print(list)

new_list = []
new_list.append(list[0])


for i in range(N):
    did = new_list[-1] - list[i]
    if did <= K:
        new_list.append(list[i + 1])
        
    print(len(new_list))

