# 最初の入力 T, N, money = map(int, input().split()) ADV = 500000 S = [0] * N P = [0] * N R = [0] * N # インタラクティブ for week in range(T): # (あ) 出版社の行動を出力する if week <= T//2 and money >= ADV*2.1: print("2",1,flush=True) else: for i in range(N): P[i] += 5 P_sum = sum(P) L = [] for i in range(N): if P[i] <= 0: L.append(0) continue ratio = P[i]/P_sum m = min(30-R[i],int(money*ratio)//10//500) L.append(m) 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()))