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