n, m=[int(s) for s in input().split()] hypped=dict([[int(s) for s in input().split()] for nr in range(m)]) print(hypped) uuritav=1 uued=[uuritav+kaik for kaik in range(1, 7)] print(uued) hypetega=[hypped[uus] if uus in hypped else uus for uus in uued] print(hypetega)