T, N, money = map(int, input().split()) S = [0] * N P = [0] * N R = [0] * N for week in range(T): print("1", *R, flush=True) money = int(input()) S = list(map(int, input().split())) P = list(map(int, input().split())) R = list(map(int, input().split()))