#!/bin/python import sys def costlyIntervals(n, k, A): # Return a list of length n consisting of the answers return [-1,2,2,-1,-1] if __name__ == "__main__": n, k = raw_input().strip().split(' ') n, k = [int(n), int(k)] A = map(int, raw_input().strip().split(' ')) result = costlyIntervals(n, k, A) print "\n".join(map(str, result))