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 = []
for i in range(D):
  S.append(list(map(int, input().split())))

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

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):
        tmp = s[i]
        print(tmp.index(max(tmp))+1)


if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    D=int(readline())
    c=list(map(int,readline().split()))
    s=[list(map(int,readline().split())) for _ in range(D)]

    kaisai=[0]*26
    for i in range(D):
        res=-float("inf")
        res_i=-1
        for j in range(26):
            henka=s[i][j]
            kaisai_kari=kaisai[:]
            kaisai_kari[j]=i+1
            for k in range(26):
                henka-=c[k]*(i+1-kaisai_kari[k])
            if res<henka:
                res=henka
                res_i=j
        kaisai[res_i]=i+1
        print(res_i+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 = min(listS)
    target = listS.index(maxi)
    answerL.append(target+1)
for ans in answerL:
    print(ans)

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=[list(map(int,input().split())) for i in range(D)]
t=[0 for i in range(D)]


for day in range(D):
    t[day]=s[day].index(max(s[day]))+1

for ts in t:
    print(ts)

Solution (Python):
import sys
input = sys.stdin.buffer.readline
import numpy as np

D = int(input())
c = np.array(input().split(), dtype=np.int32)
s = np.array([input().split() for _ in range(D)], dtype=np.int32)
last = np.zeros(26, dtype=np.int32)



ans = []
point = 0
for i in range(D):
    down = (i+1-last)*c
    loss = down + s[i,:]
    idx = np.argmax(loss)
    ans.append(idx+1)
    point += s[i, idx] - down.sum()
    last[idx] = i+1
    

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

Solution (Python):

n = int(input())
c = list(map(int, input().split()))
for _ in range(n):
    s = list(map(int, input().split()))
    a = max(enumerate(s), key=lambda x: x[1])[0] + 1
    print(a)

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)]

for i in range(1,D+1):
  tmp = ["", 0]
  for j in range(26):
    if tmp[1] < s[i-1][j]:
      tmp = [j, s[i-1][j]]
  print(tmp[0]+1)

Solution (Python):
d = int(input())
c = list(map(int,input().split()))
like=0
but=0
s=[]
last=[]
for i in range(26):
    last.append(0)
for i in range(d):
    keys=list(map(int,input().split()))
    s.append(keys)
for i in range(d):
    print(s[i].index(max(s[i]))+1)

Solution (Python):
from time import time
from random import randrange
sTime = time()
D = int(input())
C = [int(a) for a in input().split()]
S = [[int(a) for a in input().split()] for _ in range(D)]
A = [0] * D

while time() - sTime < 1.7:
    d = randrange(D)
    i = A[d]
    j = i
    while j == i:
        j = randrange(26)
    t = S[d][j] - S[d][i]
    for k in range(d)[::-1]:
        if A[k] == i:
            prev = k
            break
    else:
        prev = -1
    for k in range(d)[::-1]:
        if A[k] == j:
            new = k
            break
    else:
        new = -1
    t += C[j] * (d - new) - C[i] * (d - prev)
    if t > 0:
        A[d] = j

print(*[a + 1 for a in A], sep = "\n")

Solution (Python):
d=int(input())
C=[int(i) for i in input().split()]
s=[[int(i) for i in input().split()] for q in range(d)]

sco=0
L=[0 for i in range(26)]
ans=[]


for i in range(d):
    mayou=0
    est=s[i][0]+C[0]*(i+1-L[0])
    for p in range(1,26):
        if s[i][p]+C[p]*(i+1-L[p]) > est:
            mayou=p
            est=s[i][p]+C[p]*(i+1-L[p])
    ans.append(mayou)
    print(mayou+1) 



"""
L=[0 for i in range(26)]
for q in range(d):
    t=ans[q]
    sco+=s[q][t]
    
    
    L[t]=q+1
    for i in range(26):
        if L[i]!=-1:
            sco-=C[i]*(q+1-L[i])
    
    print(sco)
"""

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

Solution (Python):
from random import randrange
for i in range(365):
  print(randrange(1, 27))

Solution (Python):
import numpy as np

d = int(input())

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

sd = np.zeros((d, 26), dtype=np.int)
for i in range(d):
  s = list(map(int, input().split()))
  s_array = np.array(s)
  sd[i, :] = s_array
  
for i in range(d):
  print(np.argmax(sd[i, :])+1)

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
from numpy.random import randint
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    
    D = int(readline())
    C = list(map(int, readline().split()))
    S = list(list(map(int, readline().split())) for _ in range(D))

    for _ in range(D):
        print(randint(1,26))


if __name__ == '__main__':
    main()

Solution (Python):
def solve():
  D = int(input())
  C = list(map(int, input().split()))
  S = [list(map(int, input().split())) for _ in range(D)]

  ans = [1]*D
  
  return ans
print(*solve(),sep='\n')

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

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

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):



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):
        print(1)


if __name__ == '__main__':
    main()

Solution (Python):
'''
Introduction to Heuristics Contest
A - AtCoder Contest Scheduling
'''


D = int(input())


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


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


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

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

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 sys
input=sys.stdin.readline

D=int(input().rstrip('\n'))
cs=[int(x) for x in input().rstrip('\n').split()]
S={}
for i in range(D):
  S[i] = [int(x)-y for x,y in zip(input().rstrip('\n').split(),cs)]
for i in range(D):
  s1 = S[i]
  s1_s=sorted(s1,reverse=True)
  if i!=D-1:
    s2=S[i+1]
    if s2.index(max(s2))==s1.index(max(s1)):
      print(s1.index(s1_s[1])+1)
    else:
      print(s1.index(s1_s[0])+1)
print(S[D-1].index(max(S[D-1]))+1)

Solution (Python):
import random
import numpy as np
d = int(input())
c = list(map(int, input().split()))
s = []
for i in range(d):
    temp = list(map(int, input().split()))
    s.append(temp)
s = np.array(s)

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

Solution (Python):
import random

for i in range(365):
  print(i%26+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 numpy as np
d = int(input())
c = list(map(int, input().split()))
s = np.array([list(map(int, input().split())) for _ in range(d)])

init = s.argmax(axis=1) + 1

print(*init, sep="\n")

Solution (Python):

D=int(input())
c=list(map(int,input().split()))
s=[0]
last=[0]*26
for i in range(D):
  s.append(list(map(int,input().split())))

for i in range(1,D+1):
  score=0
  t=0
  score+=s[i][t]
  lasttemp=last[t]
  last[t]=i
  for j in range(26):
    score-=c[j]*(i-last[j])
  maxscore=score
  bestans=1
  last[t]=lasttemp
  for t in range(1,26):
    score=0
    score+=s[i][t]
    lasttemp=last[t]
    last[t]=i
    for j in range(26):
      score-=c[j]*(i-last[j])
    if maxscore<score:
      bestans=t+1
      maxscore=score
    last[t]=lasttemp
  print(bestans)
  last[bestans-1]=i

Solution (Python):
def main():
    from builtins import int, map, list, print, len
    from collections import defaultdict
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    D = input_number()
    c = input_number_list()
    last = defaultdict(lambda: 0)
    s = []
    for i in range(D):
        s.append(input_number_list())
    for i in range(D):
        t_idx = 0
        t_pt = 0
        for j in range(len(s[i])):
            pt = s[i][j] + (i - last[j]) * c[j]
            if t_pt < pt:
                t_idx = j
                t_pt = pt
            elif t_pt == pt:
                if c[t_idx] < c[j]:
                    t_idx = j
                    t_pt = pt
        print(t_idx + 1)


if __name__ == '__main__':
    main()

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

    last = [0]*26
    ans = []
    for d in range(D):
        s = 0
        t = 0
        for i in range(26):
            tmp = S[d][i]
            if tmp > s:
                s = tmp
                t = i + 1
        ans.append(t)
    print('\n'.join(map(str, ans)))

if __name__ == '__main__':
    main()

Solution (Python):

from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right

def main():
    D = int(input())
    c = list(map(int, input().split()))
    s = [None for _ in range(D)]
    for i in range(D):
        s[i] = list(map(int, input().split()))
    
    
    lasts = [-1] * 26
    for d in range(D):
        
        satisfies = [None] * 26
        for j in range(26):
            satisfies[j] = c[j] * (d - max(0,lasts[j]))

        
        dindex = -1
        score = 0
        for j in range(26):
            tmp = satisfies[j] + s[i][j]
            if score < tmp:
                score = tmp
                dindex = j

        lasts[dindex] = d
        print(dindex+1)

if __name__ == "__main__":
    main()

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

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


D = int(input())
c = list(map(int, input().split()))
s = [None]*D
for i in range(D):
    s[i] = list(map(int, input().split()))
    
current = [0]*26
ans = [None]*D
def greedy():
    ans = [None]*D
    for i,ss in enumerate(s):
        vs = [None]*26
        for j in range(26):
            vs[j] = (ss[j] + current[j], j)
            current[j] += c[j]
        vs.sort()
        v = vs[-1][1]
        ans[i] = v+1
        current[v] = 0
    return ans
ans = greedy()
write("\n".join(map(str, ans)))

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

D = INT()
c = LIST()
s = [LIST() for _ in range(D)]

def decrease(d, j):  
    tmp = 0
    for i in range(26):
        if i == j: continue
        tmp += c[i]*(d-last[i])
    return tmp 

ans = [0]*D

last = [0]*26
now = 0
for i in range(D):  
    ma = -INF
    ma_idx = None
    for j in range(26):  
        tmp = now
        tmp += s[i][j]
        tmp -= decrease(i+1, j)
        if tmp > ma:
            ma = tmp
            ma_idx = j
    now = ma
    last[ma_idx] = i+1
    ans[i] = ma_idx+1

print(*ans, sep="\n")

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

Days = int(input())
C = list(map(int, input().split())) 
Ss = [list(map(int, input().split())) for _ in range(Days)]


INF = 10**18

def outputToScore(T):
    last = [0]*26

    satisfied = 0
    for d, t in enumerate(T):
        t -= 1; d += 1
        satisfied += Ss[d-1][t]
        last[t] = d
        for i, c in enumerate(C):
            satisfied -= c*(d-last[i])
        print(satisfied)

def greedy():
    last = [0]*26
    for d in range(Days):
        satisfied_max = -INF
        selected = -1
        for t in range(26):
            score_t = Ss[d][t]
            for j, c in enumerate(C):
                if t != j:
                    score_t -= c*(d+1-last[j])
            if score_t > satisfied_max:
                satisfied_max = score_t
                selected = t
        print(selected+1)
        last[selected] = d+1

greedy()

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

res = 0
last = [0 for _ in range(26)]

for d in range(D):
    maxtmp = -10**18
    contest = None
    for i in range(26):
        tmp = res
        lasttmp = last[:]
        tmp += S[d][i]
        lasttmp[i] = d + 1
        for j in range(26):
            tmp -= C[j] * ((d + 1) - lasttmp[j])
        if maxtmp <= tmp:
            maxtmp = tmp
            contest = i
    res += S[d][contest]
    last[contest] = d + 1
    for j in range(26):
        res -= C[j] * ((d + 1) - last[j])
    print(contest + 1)

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):
D = int(input())
C = list(map(int, input().split()))

S = []
for i in range(D):
    Si = list(map(int, input().split()))
    S.append(Si)
I = 26

last = [0]*I

for day in range(D):
    score = [last[i]*S[day][i] for i in range(I)]
    contest = score.index(max(score))

    last = [x+1 for x in last]
    last[contest] = 0

    print(contest + 1)

Solution (Python):
import random

N = int(input())

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

Solution (Python):
import math

import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    d = int(ipt())
    c = [int(i) for i in ipt().split()]
    s = [[int(i) for i in ipt().split()] for _ in range(d)]
    ld = [-1]*26
    edval = [0]*26

    for i in range(d):
        edval = s[i]*1
        for j in range(26):
            edval[j] += c[j]*(i-ld[j])
        v = edval.index(max(edval))
        ld[v] = i
        print(v+1)

    return

if __name__ == '__main__':
    main()

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)
    lst = [0] * 26
    for i in range(D):
        print(i % 26 + 1)
        
        




if __name__ == '__main__':
    main()

Solution (Python):
from random import randint

D=int(input())
c=list(map(int,input().split()))
s=[0]*D
for i in range(D):
    s[i]=list(map(int,input().split()))    

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

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 numpy as np







D=int(input())



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

c=np.zeros(365)
l=np.zeros([26,365])
T=[]
for i in range(D):
    S = list(map(int,input().split()))
    t=max(S)
    T.append(S.index(t))
    
    
for s in T:
    print(s+1)

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

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):
d=int(input())
c=list(map(int, input().split()))
s=[list(map(int, input().split())) for _ in range(d)]
t=[0]*26
ans=0
for i in range(1,d+1):
  tmp=s[i-1].index(max(s[i-1]))
  print(tmp+1)

Solution (Python):
import random
for _ in range(365):
    print(random.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)]


v=[0]*(D+1)
for i in range(D):
    v[i]=max(s[i])
    print(s[i].index(max(s[i]))+1)

Solution (Python):
import numpy as np

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

last_day = np.zeros(26, dtype=int)
score = 0

def calc(d, i, last_day):
    decrease = c * (d - last_day)
    decrease[i] = 0
    return S[d, i] + decrease.sum()

ans = []
for d in range(1, D+1):
    diff = [calc(d-1, i, last_day) for i in range(26)]
    choice = np.argmax(diff)
    ans.append(choice+1)
    last_day[choice] = d

print(*ans, sep='\n')

Solution (Python):
from math import inf
A=26

D=int(input())

C=[0]+list(map(int,input().split())) 
S=[0]*(D+1) 

for i in range(1,D+1):
    S[i]=[0]+list(map(int,input().split()))


L=[0]*(A+1)
for d in range(1,D+1):
    M=-inf
    E=0

    for j in range(1,A+1):
        X=0
        for k in range(1,A+1):
            if j!=k:
                X-=C[k]*(d-L[k])
                
        if M<=X+S[d][j]:
            M=X+S[d][j]
            E=j

    print(E)
    
    for j in range(1,A+1):
        if j!=E:
            L[j]+=1
        else:
            L[j]=0

Solution (Python):
d=int(input())
c=list(map(int,input().split()))
num=[0]*26
ans=[]
for i in range(1,d+1):
    num1=1
    num2=-(10**100)
    num3=[0]*26
    for j in range(26):
        num3[j]=-1*((i-num[j])*c[j])
    s=list(map(int,input().split()))
    for j in range(26):
        num5=s[j]-num3[j]
        if num5>num2:
            num1=j+1
            num2=num5
    ans.append(num1)
    num[num1-1]=i
for i in range(d):
    print(ans[i])

Solution (Python):
D=int(input())
c=[int(x) for x in input().split()]
s=[[0]*i for i in range(D)]
for i in range(D):
  s[i]=[int(x) for x in input().split()]
for i in range(D):
  contest=max(s[i])
  print(s[i].index(contest)+1)

Solution (Python):

D=int(input())
C=list(map(int,input().split()))
S=[]
S_max=[]
for i in range(D):
    s=list(map(int,input().split()))
    S_max.append(max(s))
    S.append(s)

minus=365*sum(C)

for i in range(D):
    A=S[i]
    ma=S_max[i]
    print(A.index(ma)+1)

Solution (Python):
import random

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

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

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

now = [0]*26
for i in range(365):
    no = -1
    score = -10**10
    for j in range(26):
        count = s[i][j]
        for k in range(26):
            if j == k:
                continue
            count -= (i+1-now[k])*c[k]
        if count > score:
            no = j
            score = count
    print(no+1)
    now[no] = i

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

last = [0 for _ in range(26)]
calc = [0 for _ in range(26)]

for i in range(D):
  for j in range(26):
    day = i + 1
    calc[j] = c[j] * (day - last[j])
  min_idx = calc.index(max(calc))
  last[min_idx] = day
  print(min_idx + 1)

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


def main(D, C, S):
    for _ in range(D):
        print(randint(1, 26))


if __name__ == '__main__':
    D = int(input())
    C = [int(i) for i in input().split()]
    S = [[int(i) for i in input().split()] for j in range(D)]
    main(D, C, S)

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):
    delta = [0]*26
    for j in range(26):
        delta[j] = S[i][j] - since[j]
    value = max(delta)
    contest = delta.index(value)
    print(contest+1) 
    for j in range(26):
        if j != contest:
            since[j] += C[j]
        else:
            since[j] = C[j]

Solution (Python):
D = int(input())
c = list(map(int, input().split()))
last = [0] * 26
ans = []
for d in range(1, D+1):
    s = list(map(int, input().split()))
    maxs = float('-inf')
    maxi = -1
    cumsump = 0
    for i in range(26):
        tmp = -c[i] * (d - last[i])
        cumsump += tmp
    for i in range(26):
        tmp = -c[i] * (d - last[i])
        tmp2 = s[i] + cumsump - tmp
        if tmp2 > maxs:
            maxs = tmp2
            maxi = i
    ans += [maxi+1]
    last[maxi] = d
        
for a in ans:
    print(a)

Solution (Python):
from random import randint
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(randint(1,26))

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    d = i_input()
    c_list = i_list()
    s_list = i_row_list(d)

    for i in range(d):
        tmp = s_list[i][10] % 26 + 1
        if tmp <= 0:
            tmp = 1
        if tmp >= 27:
            tmp = 26
        print(tmp)

if __name__ == '__main__':
    main()

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

Solution (Python):
import numpy as np
D = int(input())
c = list(map(int,input().split()))
s = np.empty((D,26))
for i in range(D):
    s[i,:] = np.array(list(map(int,input().split())))

for i in range(D):
    print(s[i,:].flatten().argmax()+1)

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

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

Last = [-1] * 26

ans = 0

for i in range(D):
    T = max(S[i])
    t = S[i].index(T)
    
    
    
    
    print(t+1)

Solution (Python):
D=int(input())
c = list(map(int,input().split()))
s=[[0 for e in range(26)] for f in range(D)]
for i in range(D):
 s[i]=list(map(int,input().split()))
last=[0]*26
ans=0
point=[0]*D
for i in range(D):
 saidai=-(10**10)
 kouho=0
 for j in range(26):
  if s[i][j]+c[j]*((i+1)-last[j])>=saidai:
   kouho=j+1
   saidai=s[i][j]+c[j]*((i+1)-last[j])
 print(kouho)