N, K = input().split(" ") N = int(N) K = int(K) for i in range(N-1): a = input() if N < K: print("-1") else: print(K-1)