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