#-*- coding:utf-8 -*-
a = list(map(int,input().split()))
num = 0
for i in range(a[0] + a[1]):
    num += 1
    list_{}.format(num) = []
    list_{}.format(num).append(list(map(int,input().split())))
    print(list_{}.format(num))
