from itertools import product n = int(input())-1 m = int(input()) M = list(range(m)) A = [list(map(int, input().split())) for _ in M] # nを二進展開(n = sum([2**b for b in B])) B = [] e = 0 while n != 0: if (n ^ 1<