Problem:
   Problem Statement AtCoder currently hosts three types of contests: ABC, ARC, and AGC. As the number of users has grown, in order to meet the needs of more users, AtCoder has decided to increase the number of contests to 26 types, from AAC to AZC. For convenience, we number these 26 types as type 1 through type 26. AtCoder wants to schedule contests for D days so that user satisfaction is as high as possible. For every day, AtCoder will hold exactly one contest, and each contest will end on that day. The satisfaction is calculated as follows.   The satisfaction at the beginning of day 1 is 0. Satisfaction can be negative.  Holding contests increases satisfaction. The amount of increase will vary depending on a variety of factors. Specifically, we know in advance that holding a contest of type i on day d will increase the satisfaction by s_{d,i} .  If a particular type of contest is not held for a while, the satisfaction decreases. Each contest type i has an integer c_i , and at the end of each day d=1,2,...,D , the satisfaction decreases as follows. Let \mathrm{last}(d,i) be the last day before day d (including d ) on which a contest of type i was held. If contests of type i have never been held yet, we define \mathrm{last}(d,i)=0 . At the end of day d , the satisfaction decreases by \sum _{i=1}^{26}c_i \times (d-\mathrm{last}(d,i)) .   Please schedule contests on behalf of AtCoder.
If the satisfaction at the end of day D is S , you will get a score of \max(10^6 + S, 0) .
There are 50 test cases, and the score of a submission is the total scores for each test case.
You can make submissions multiple times, and the highest score among your submissions will be your score.      Constraints  D = 365  Each c_i is an integer satisfying 0\leq c_i \leq 100 .  Each s_{d,i} is an integer satisfying 0\leq s_{d,i} \leq 20000 .         Input Input is given from Standard Input in the following format:  D  c_1  c_2  \cdots  c_{26}  s_{1,1}  s_{1,2}  \cdots  s_{1,26}  \vdots  s_{D,1}  s_{D,2}  \cdots  s_{D,26}       Output Let t_d ( 1\leq t_d \leq 26 ) be the type of the contest that will be held at day d .
Print D integers t_d to Standard Output in the following format:  t_1  t_2  \vdots  t_D   Any output that does not follow the above format may result in 0 points WA for that test case.      Input Generation Each integer c_i and s_{d,i} is generated independently and uniformly at random from the integers in the range described in the problem statement.        Sample Input 1 5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 16407 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192      Sample Output 1 1
17
13
14
13  Note that this example is a small one for checking the problem specification. It does not satisfy the constraint D=365 and is never actually given as a test case. The final satisfaction with this output is 79325, so the score is 1079325.  Input generator, score calculator, and visualizer      Beginner's Guide If you don't know what to do, proceed to problem B or C.

Solution (Python):
D=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for _ in range(D)]

last=[0]*26

for d in range(1,D+1):
    choice=0
    cost=c[0]*(d-last[0])
    for i in range(1,26):
        if c[i]*(d-last[i])>cost:
            choice=i
            cost=c[i]*(d-last[i])
    last[choice]=d
    print(choice+1)

Solution (Python):
D = int(input())
cs = list(map(int, input().split()))

S=0
for d in range(D):
    s=list(map(int, input().split()))
    max_value = max(s)
    max_index = s.index(max_value)
    print(max_index+1)
    S+=max_value

Solution (Python):
D = int(input())
c = list(map(int,input().split()))
lst = []
for i in range(D):
    s = list(map(int,input().split()))
    print(s.index(max(s)) + 1)

Solution (Python):

import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


D = z()
C = zz()
S = defaultdict(list)
for i in range(D):
    S[i + 1] = zz()
for i in range(D):
    print(i % 26 + 1)

Solution (Python):
import sys
import math
from collections import deque
import heapq
import itertools
from decimal import Decimal
import bisect
from operator import itemgetter
MAX_INT = int(10e18)
MIN_INT = -MAX_INT
mod = 1000000000+7
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

def tami(now, ContestType):
  res = c[ContestType] * (now - LastDay[ContestType])
  return res

D = I()
c = IL()
s = [IL() for i in range(D)]

LastDay = [0]*26
for i in range(1,D+1):
  tmp = ["", 0]
  for j in range(26):
    Dscore = tami(i, j)
    if Dscore > tmp[1]:
      tmp = [j, Dscore]
  print(tmp[0]+1)
  LastDay[tmp[0]] = i

Solution (Python):
def main():
    D = int(input())
    c = list(map(int, input().split()))
    s = [list(map(int, input().split())) for _ in range(D)]

    for i in range(D):
        print(1)


if __name__ == "__main__":
    main()

Solution (Python):
import sys
readline = sys.stdin.readline

def solve_greedy():
    D = int(readline())
    C = list(map(int, readline().split()))
    S = [list(map(int, readline().split())) for i in range(D)]
    N = 26

    lasts = [0] * N

    ans = [None] * D

    for day in range(1, D + 1):
        m, mt = -1e10, 0
        for t in range(N):
            a = S[day - 1][t] + (day - lasts[t]) * C[t]
            if a > m:
                mt = t
                m = a
        
        lasts[mt] = day

        neg = sum((day - lasts[t]) * C[t] for t in range(N))
        pos = S[day - 1][t]

        ans[day - 1] = mt
    
    for a in ans:
        print(a + 1)



solve_greedy()

Solution (Python):
d = int(input())
c = tuple(map(int, input().split()))
s = [
    tuple(map(int, input().split()))
    for _ in range(d)
]

for i in range(d):
    m = sorted((ss, j) for j, ss in enumerate(s[i]))[-1]
    print(m[1] + 1)

Solution (Python):
D = int(input())
N = 26
c = [int(i) for i in input().split()]
last = [0 for i in range(N)]

for i in range(D):
  s_d = [int(j) for j in input().split()]
  d_score = -1
  ans = -1
  for j in range(N):
    last_day = i + 1 - last[j]
    arg = s_d[j] - c[j]*last_day
    if d_score < arg:
      d_score = arg
      ans = j+1
  print(ans)
  last[ans-1] = i+1

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
input = sys.stdin.readline

D = int(input())
C = list(map(int,input().split()))
S = [list(map(int,input().split())) for _ in range (D)]
M = 26
INF = 10**20

ans = [0]*D
lasts = [0]*(M+1)

for i in range(D):
    score = -INF
    contest = 0
    for m in range(1,M+1):
        cur = S[i][m-1]
        cur -= C[m-1]*(i+1-lasts[m])
        if cur>score:
            score = cur
            contest = m
    ans[i] = contest
    lasts[contest] = i

for a in ans:
    print(a)

Solution (Python):
[print(1) for i in range(365)]

Solution (Python):
def k(n):
  if n%26!=0:
    return n%26
  else:
    return 26
L=list(range(1,366))
L=list(map(k,L))
for i in range(365):
  print(L[i])

Solution (Python):
d=int(input())
arr = list(map(int,list(input().split())))


for i in range(d):
    arr1 = list(map(int,list(input().split())))
    print(arr1.index(max(arr1))+1)

Solution (Python):
import random

D = int(input())
c_list = list(map(int, input().split()))
s_list = [list(map(int, input().split())) for _ in range(D)]

for i in range(D):
    print(random.randint(1,26))

Solution (Python):
D = int(input())
c = [0] + list(map(int, input().split()))
s = [0] + [[0] + list(map(int, input().split())) for _ in range(D)]
last = [0]*27

for d in range(1, D+1):
    SLvar = [s[d][i] + c[i] * (d - last[i]) for i in range(1, 27)]

    t = SLvar.index(max(SLvar)) + 1
    print(t)
    last[t] = d

Solution (Python):
d=int(input())
c=list(map(int,input().split()))
s=[]
for i in range(d):
	r=list(map(int,input().split()))
	s.append(r)

for i in range(d):
	print(s[i].index(max(s[i]))+1)

Solution (Python):
D = int(input())
cl = list(map(int, input().split()))
sl = [list(map(int, input().split())) for _ in range(D)]

def score(d, ti, last):
    s = sl[d-1][ti]
    for i in range(len(cl)):
        c = cl[i]
        s -= c*(d-last[i])
    return s

res = []
last = [0]*26
for d in range(D):
    ti = 0
    s = 0
    for t in range(26):
        l = last[t]
        last[t] = d+1
        ss = score(d+1,t,last)
        if ss>s:
            s = ss
            ti = t
        last[t] = l
    last[ti] = d+1
    res.append(ti+1)

for t in res:
    print(t)

Solution (Python):
for _ in range(365):
    print(1)

Solution (Python):
d = int(input())
c = list(map(int,input().split()))
s = []
for i in range(d):
  si = list(map(int,input().split()))
  s.append(si)
lastd = [-1 for _ in range(26)]
for i in range(d):
  mx = 0
  mj = 0
  
  
    
  for j in range(26):
    if s[i][j] + (i-lastd[j])*c[j] > mx:
      mx = s[i][j] + (i-lastd[j])*c[j]
      mj = j
  lastd[mj] = i
  print(mj+1)

Solution (Python):
import sys
input = sys.stdin.readline

D = int(input())
cost = list(map(int, input().split()))
S = [list(map(int, input().split())) for _ in range(D)]

last_held = [-1 for i in range(26)]
ans = []
for date, line in enumerate(S):
    max_score = line[0] - cost[0]*last_held[0]
    max_index = 0
    for i, score in enumerate(line):
        tmp = score - cost[i]*last_held[i]
        if max_score < tmp:
            max_index = i
            max_score = tmp
    last_held[max_index] = date
    ans.append(max_index+1)
print("\n".join(map(str, ans)))

Solution (Python):
import random
d = int(input())
c = list(map(int,input().split()))
for i in range(d):
    s = list(map(int,input().split()))
    print(random.randint(1,26))

Solution (Python):
import random
for _ in range(365):
  print(random.randint(1, 26))

Solution (Python):
D = int(input())

cs = [int(i) for i in input().split()]

last = {n: 0 for n in range(1, 27)}

for day in range(1, D+1):
    ss = [int(i) for i in input().split()]
    max_score = 0
    max_i = 1
    for i, s in enumerate(ss, 1):
        human = day-last[i]
        s_human = s + cs[i-1] * human
        if s_human > max_score:
            max_score = s_human
            max_i = i
    print(max_i)
    last[max_i] = day

Solution (Python):
d = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for i in range(d)]

last = [-1]*26

ans = 0
for i in range(d):
    op = s[i].index(max(s[i]))
    ans += s[i][op]
    last[op]=i
    for j in range(26):
        ans -= c[j]*(i-last[j])
    print(op+1)

Solution (Python):
d = int(input())
c = list(map(int, input().split()))
for i in range(d):
    s = list(map(int, input().split()))
    num = max(s)
    print(s.index(num)+1)

Solution (Python):
d = int(input())
c = list(map(int, input().split()))
mtx = [list(map(int, input().split())) for _ in range(d)]

point = [c[i] for i in range(26)]

for i in range(d):
    pnt = [0] * 26
    for j in range(26):
        pnt[j] += point[j]
    for j in range(26):
        pnt[j] += mtx[i][j]
    m = max(pnt)
    a = [i for i, j in enumerate(pnt) if j == m]
    print(a[0]+1)
    for j in range(26):
        point[j] += c[j]
    point[a[0]] = c[a[0]]

Solution (Python):
from dataclasses import dataclass, field

import scipy
import numpy as np
from numba import jit


@dataclass()
class Node:
    date: int
    value: int
    result: list = field(default_factory=list)

    def __lt__(self, other) -> bool:
        return self.value < other.value

    def output(self) -> str:
        assert len(self.result) == 365
        return '\n'.join(self.result)


D = int(input())  
C = np.array(list(map(int, input().split())), dtype=int)  
S = np.array([list(map(int, input().split())) for _ in range(D)], dtype=int)  

for d in range(D):
    t = 0
    max_s = 0
    for i, s in enumerate(S[d]):
        if s > max_s:
            t = i
            max_s = s

    print(t + 1)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    D = int(input())
    C = [int(x) for x in input().split()]
    S = [[int(x) for x in input().split()] for _ in range(D)]


    for i in range(D):
        print(i % 26 + 1)



if __name__ == '__main__':
    main()

Solution (Python):
d=int(input())
c=list(map(int, input().split()))
s=[]
last=[0]*26
for i in range(d):
  s.append(list(map(int, input().split())))
for day in range(1,d+1):
  man=[]
  for i in range(26):
    man.append(s[day-1][i]-last[i]*c[i])
  con=man.index(max(man))
  last[con]=day
  print(con+1)

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
import random
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	D = inputInt()
	C = inputList()
	S = []
	ans = []
	for i in range(D):
		s = inputList()
		S.append(s)

	minC = min(C)
	minCn = 0
	for i,val in enumerate(C):
		if val == minC:
			minCn = i

	for i,val in enumerate(S):
		tmp = max(val)
		for j,vol in enumerate(val):
			if tmp == vol:
				ans.append(minCn+1)
				break

	for i in range(D):
		print(ans[i])



if __name__ == "__main__":
	main()

Solution (Python):
import random
d = int(input())
c = list(map(int, input().split()))
s = []
for i in range(d):
    temp = list(map(int, input().split()))
    s.append(temp)
for i in range(d):
    get = random.uniform(1, 27)
    if get == 27:
        get = 26
    print(int(i%26+1))

Solution (Python):
for i in range(365):
  print(i%26+1)

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline

    d = int(input())
    c = list(map(int, input().split()))
    s = [list(map(int, input().split())) for _ in range(d)]

    for i in range(1, d + 1):
        p, q = divmod(i, 26)

        if q == 0:
            q += 1

        print(q)


if __name__ == '__main__':
    main()

Solution (Python):
import random
D = int(input())
c = input().split()
for i in range(D):
	p = input().split()
for i in range(D):
	print(random.randint(1,26))

Solution (Python):
import random as ra
D = int(input())
c = list(map(int,input().split()))
s = [list(map(int,input().split())) for i in range(D)]
for i in range(D):
    print(ra.randint(1,26))

Solution (Python):
d=int(input())
C=list(map(int,input().split()))
S=[list(map(int,input().split())) for i in range(d)]
A=[0]*26
for i in range(d):
    cnt=[0]*26
    for j in range(26):
        A[j]+=C[j]
        cnt[j]=S[i][j]-A[j]
    now=cnt.index(max(cnt))
    print(now+1)
    A[now]=0

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
from math import floor, sqrt, factorial, hypot, log  
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict, deque
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint


def ceil(a, b): return (a + b - 1) // b


inf = float('inf')
mod = 10 ** 9 + 7


def pprint(*A):
    for a in A:     print(*a, sep='\n')


def INT_(n): return int(n) - 1


def MI(): return map(int, input().split())


def MF(): return map(float, input().split())


def MI_(): return map(INT_, input().split())


def LI(): return list(MI())


def LI_(): return [int(x) - 1 for x in input().split()]


def LF(): return list(MF())


def LIN(n: int): return [I() for _ in range(n)]


def LLIN(n: int): return [LI() for _ in range(n)]


def LLIN_(n: int): return [LI_() for _ in range(n)]


def LLI(): return [list(map(int, l.split())) for l in input()]


def I(): return int(input())


def F(): return float(input())


def ST(): return input().replace('\n', '')


def main():
    D = I()
    c = LI()
    s = LLIN(D)
    for i in range(D):
        l = s[i]
        print(l.index(max(l)) + 1)




if __name__ == '__main__':
    main()

Solution (Python):
D = int(input())
listC = list(map(int, input().split()))
answerL = []
for i in range(D):
    listS = list(map(int, input().split()))
    maxi = max(listS)
    target = listS.index(maxi)
    answerL.append(target+1)
for ans in answerL:
    print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

d = int(input())
C = list(map(int,input().split()))
S = [list(map(int,input().split())) for i in range(d)]

c = 26

ans = 0
L = [-1] * c




for i in range(d):
    ANS = [0] * c
    for k in range(c):
        ANS[k] = S[i][k] + C[k] * (i - L[k])
    ind = ANS.index(max(ANS))
    ans += S[i][ind]
    L[ind] = i
    for j in range(c):
        ans -= C[j] * (i - L[j])
    
    print(ind + 1)

Solution (Python):
import sys
input=sys.stdin.readline

D=int(input().rstrip('\n'))
cs=[int(x) for x in input().rstrip('\n').split()]
for i in range(D):
  Ss = [int(x) for x in input().rstrip('\n').split()]
  print(Ss.index(max(Ss))+1)

Solution (Python):
import numpy as np
import sys
input = sys.stdin.buffer.readline
D = int(input())
C = list(map(int, input().split()))
S = []
for _ in range(D):
    S.append(list(map(int, input().split())))



contest = np.argmax(S[0]) + 1


for i in range(contest, D + contest):
    print((i - 1) % 26 + 1)

Solution (Python):
D = int(input())
C = [int(c) for c in input().split()]
S = [[int(s) for s in input().split()] for _ in range(D)]

T = [0]*D
for i in range(D):
    temp = -1
    for j in range(26):
        if temp < S[i][j]:
            temp = S[i][j]
            idx = j+1
    T[i] = idx

for t in T:
    print(t)

Solution (Python):
import random
d=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for _ in range(d)]



for i in range(d):
    print(random.randrange(1,27))

Solution (Python):

import random
n, *a = map(int, open(0).read().split())
for i in range(n):
    print(random.randint(1, 26))

Solution (Python):
d = int(input())

c = list(map(int,input().split()))

s = []

for _ in range(d):
    temp = list(map(int,input().split()))

    s.append(temp)

for i in range(d):
    print(s[i].index(max(s[i])) + 1)

Solution (Python):
for i in range(365):print(15)

Solution (Python):
import sys
input = sys.stdin.readline

D=int(input())
C=list(map(int,input().split()))
S=[list(map(int,input().split())) for i in range(D)]

for i in range(D):
    MAX=-1
    for j in range(26):
        if S[i][j]>MAX:
            k=j
            MAX=S[i][j]
    print(k+1)

Solution (Python):
D = int(input())
C = list(map(int,input().split())) 
S = [] 
for i in range(D): 
    temp = list(map(int,input().split()))
    S.append(temp)

since = [0 for _ in range(26)] 
for i in range(26):
    since[i] += C[i]
for i in range(D):
    contest= max(since)
    idx = since.index(contest)
    print(idx+1) 
    for j in range(26):
        if j != idx:
            since[j] += C[j]
        else:
            since[j] = C[j]

Solution (Python):
D = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for _ in range(D)]

max_c = 0
index_c = 0

for i, C in enumerate(c):
    if C > max_c:
        index_c = i
        max_c = C

for d in range(D):
    print(index_c+1)

Solution (Python):
D=int(input())
c=list(map(int,input().split()))
s = [list(map(int,input().split())) for l in range(D)]


last=[0 for i in range(26)]

for i in range(D):
  best=0
  sat=0
  for j in range(26):
    tempsat=0
    tempsat+=s[i][j]
    templast=last[j]
    last[j]=i
    for k in range(26):
      tempsat-=c[k]*(i-last[k])
    if(sat<=tempsat):
      sat=tempsat
      best=j
    last[j]=templast
  print(best+1)

Solution (Python):
d=int(input())
c=list(map(int,input().split()))
s=[]
for i in range(d):
  s.append(list(map(int,input().split())))

ans=[]
l=[-1 for i in range(26)]
for i in range(d):
  ms=-10**9
  mt=None
  for j in range(26):
    js=c[j]*(i-l[j])+s[i][j]
    if ms<js:
      ms=js
      mt=j
  l[mt]=i
  ans.append(mt)

for i in ans:
  print(i+1)

Solution (Python):
import random
import sys
import time

input = sys.stdin.readline

def main():
    d = int(input())
    c = list(map(int, input().split()))
    s = []
    for _ in range(d):
        s.append(list(map(int, input().split())))
    
    start_time = time.time()
    ans = []
    suff = 0
    
    
    
    
        
    
    last = [0 for _ in range(26)]
    for i in range(d):
        tmpsuf = 0
        tmpc = 0
        for con in range(26):
            ttttt = suff + s[i][con]
            minus = 0
            for j in range(26):
                if con == j:
                    continue
                minus -= (i - last[j]) * c[j]
            ttttt += minus
            if ttttt > tmpsuf:
                tmpsuf = ttttt
                tmpc = con
        last[tmpc] = i
        suff = tmpsuf
        ans.append(tmpc)


    print(*[a + 1 for a in ans])

if __name__ == '__main__':
    main()

Solution (Python):
d = int(input())
c = list(map(int,input().split()))
s_di=[list(map(int,input().split())) for i in range(d)]
last=[0 for i in range(26)]


for i in range(1,d+1):
    tmp_max=-10**6
    tmp_choice=-1
    fuman=sum([(i-last[k])*c[k] for k in range(26)])
    for j in range(26):
        tmp=-fuman+(i-last[j])*c[j]+s_di[i-1][j]
        if tmp>tmp_max:
            tmp_max=tmp
            tmp_choice=j
    print(tmp_choice+1)
    last[j]=i

Solution (Python):
d=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for _ in range(d)]
for i in range(d):
    print(s[i].index(max(s[i]))+1)

Solution (Python):
d = int(input())
c = list(map(int, input().split()))
s = []

for _ in range(d):
    row = list(map(int, input().split()))
    s.append(row)



import random

for i in range(d):
    print(1+s[i].index(max(s[i])))

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
import random
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
d = I()
c_l = LI()
s_l = [LI() for _ in range(d)]
for i in range(d):
    print(random.randint(1, 26))

Solution (Python):
import random
random.random()
d=int(input())
c=list(map(int,input().split()))
s=[None]*d
for i in range(d):
  s[i]=list(map(int,input().split()))
for j in range(d):  
  rand=random.randint(1,26)
  print(rand)

Solution (Python):
D = int(input())
c = list(map(int, input().split()))
s = []
for i in range(D):
  s.append(list(map(int, input().split())))
  
num = 1
for i in range(D):
  print(num)
  if(num == 26):
    num = 1
  else:
    num += 1

Solution (Python):
D = int(input())
for _ in range(D):
    print(1)

Solution (Python):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque


from collections import Counter

from itertools import accumulate,combinations,permutations

from heapq import heapify,heappop,heappush


from functools import lru_cache

from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(x):print(x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    

    D = int(input())
    
    cs = tuple(map(int, input().split())) 
    
    S = tuple(tuple(map(int, input().split())) for i in range(D)) 
    ls=[0]*26
    for i in range(D):
        s=S[i]
        if i==0:
            msc=-1000000
            ans=-1
            for j in range(26):
                sc=s[j]+cs[j]
                if msc<sc:
                    ans=j
                msc=sc
            ls[ans]=1

            print(ans+1)
            continue
        msc=0
        ans=-1
        dec=[-cs[j]*(i+1-ls[j]) for j in range(26)]
        msc=-10000000
        ans=-1
        for j in range(26):
            sc=s[j]-dec[j]
            if msc<sc:
                ans=j
            msc=sc
        ls[ans]=i+1
        print(ans+1)



            
                    
            






if __name__ == "__main__":
    main()

Solution (Python):
import sys
readline = sys.stdin.readline



D = int(readline())

C = list(map(int,readline().split())) 

last_submit = [-26] * 26

for i in range(D):
  S = list(map(int,readline().split()))
  for j in range(len(S)):
    S[j] = (S[j],j)
  S = sorted(S, key = lambda x:x[0], reverse = True)
  for j in range(len(S)):
    index = S[j][1]
    if i - last_submit[index] < 26:
      continue
    print(index + 1)
    last_submit[index] = i
    break
  else:
    print(S[0][1] + 1)

Solution (Python):
for i in range(365):
  print(i%26+1)

Solution (Python):
import random
D=int(input())
c=[int(i) for i in input().split()]
s=[[int(i) for i in input().split()] for i in range(D)]
for i in range(D):
    print(random.randrange(1,27))

Solution (Python):


D = int(input())

C = [int(y) for y in input().split()]

S = []

for i in range(D):
    s = [int(y) for y in input().split()]
    S.append(s)

for i in S:
    k = 0
    num = 0
    for f,t in enumerate(i):
        k = max(k,t)
        if k == t:
            num = f + 1
    print("{}".format(num))

Solution (Python):
for i in range(365):
  print(i%26+1)

Solution (Python):
import random

D = int(input())
c_list = list(map(int, input().split()))
s_list = [list(map(int, input().split())) for _ in range(D)]

for i in range(D):
    print(random.randint(1,26))

Solution (Python):
D=int(input())
C=list(map(int,input().split()))
S=list(map(list,zip(*[map(int,input().split()) for i in range(D)])))
s=[sum(l) for l in S]
print(*[s.index(max(s))+1]*D,sep='\n')

Solution (Python):
D=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for i in range(D)]
import random
for i in range(D):
  print(random.randint(1,26))

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline

d=int(input().rstrip())
c=[int(i) for i in input().split()]
for i in range(d):
    s=[int(i) for i in input().split()]
    print(i%26+1)

Solution (Python):
import sys
from time import time
import random

input = sys.stdin.readline
D = int(input())
C = [int(c) for c in input().split()]
S = [[int(s) for s in input().split()] for _ in range(D)] 
Ans = [int(i) % 26 + 1 for i in range(D)]

def change(point): 
    ci = random.randint(0, D-1)
    contest = random.randint(1, 26)
    before = Ans[ci]
    Ans[ci] = contest
    newPoint = calcScore()
    if point > newPoint:
        Ans[ci] = before
    else:
        point = newPoint
    return


def calcScore():
    Last = [0] * 26
    point = 0
    for i, a in enumerate(Ans):
        point += S[i][a - 1]
        Last[a-1] = i + 1
        penalty = 0
        for j in range(26):
            penalty += C[j] * (i + 1 - Last[j])
        point -= penalty
    return point

def solve():
    start = time()
    point = calcScore()

    while time() - start < 1.8:
        change(point)

    print(*Ans, sep="\n") 
   
    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
d=int(input())
c=list(map(int, input().split()))
s=[list(map(int,input().split())) for _ in range(d)]

from random import randint
for i in range(d):
    print(c.index(max(c))+1)

Solution (Python):
d = int(input())  
c = list(map(int, input().split()))


for i in range(d):
    p = list(map(int, input().split()))
    print(p.index(max(p)) + 1)

Solution (Python):
d=int(input())

last=[0]*26
c=list(map(int,input().split()))
s=[list(map(int, input().split())) for _ in range(d)]

ans=[]

for i in range(d):

    
    down=0
    for j in range(26):
        down+=(c[j]*((j+1)-last[j]))
    

    score=-1*(10**9)
    kouho=0
    for j in range(26):
        if score<s[i][j]-down+c[j]:
            score=s[i][j]-down+c[j]
            kouho=j+1
    ans.append(kouho)

for item in ans:
    print(item)

Solution (Python):
d=int(input())
c = list(map(int,input().split()))

s=[None]*d
for i in range(d):
    s[i] = list(map(int,input().split()))

def maxarg(l):
    nl=len(l)
    ma=-10**20
    idx=-1
    for i in range(nl):
        if l[i]>ma:
            ma=l[i]
            idx=i
    return (idx,ma)

for ss in s:
    print(maxarg(ss)[0]+1)

Solution (Python):
D = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for _ in range(D)]

for i in range(D):
    print(i % 26 + 1)

Solution (Python):
import random

for i in range(365):
    print(random.randint(1, 26))

Solution (Python):
D = int(input())
c = list(map(int, input().split()))
s = []
for k in range(D):
    s.append(list(map(int, input().split())))


ans = [s[0].index(max(s[0]))+1 for k in range(D)]

for k in range(D):
    print(ans[k])

Solution (Python):
import random
d = int(input())
c = list(map(int, input().split()))
s = []
for i in range(d):
    temp = list(map(int, input().split()))
    s.append(temp)
for i in range(d):
    get = random.uniform(1, 27)
    if get == 27:
        get = 26
    print(int(get))

Solution (Python):
import sys,collections as cl,bisect as bs,random
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
	return list(map(int,input().split()))
def m(): 
	return map(int,input().split())
def onem(): 
	return int(input())
def s(x): 
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): 
	return " ".join(map(str,x))
def max2(x): 
	return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

d = onem()

for i in range(d):
	print(random.randrange(1,27))

Solution (Python):
d=int(input())
for i in range(d):
  print(1)