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

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

    score = 0
    last_day = [-1] * 26

    for d in range(D):
        print(S[d].index(max(S[d])) + 1)


if __name__ == '__main__':
    main()

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  
def LS2(): return list(sys.stdin.readline().rstrip())  

D = I()
c = [0] + LI()
s = [0] + [[0] + LI() for i in range(D)]

last = [0]*27

for i in range(1,D+1):
    r = 0
    manzokudo = 0
    for j in range(1,27):
        m = s[i][j]
        for k in range(1,27):
            if k != j:
                m -= c[k]*(i-last[k])
            else:
                continue
        if j == 1:
            r = 1
            manzokudo = m
        else:
            if manzokudo < m:
                manzokudo = m
                r = j
    print(r)
    last[r] = i

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.randint(1, 26))

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 = [randrange(26) for _ in range(D)]

while time() - sTime < 1.8:
    d = randrange(D)
    i = A[d]
    for k in range(d)[::-1]:
        if A[k] == i:
            prev = k
            break
    else:
        prev = -1
    for j in range(26):
        t = S[d][j] - S[d][i]
        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 = list(map(int,input().split()))
like=0
but=0
s=[]
last=[]
for i in range(26):
    last.append(0)
for i in range(365):
    keys=list(map(int,input().split()))
    s.append(keys)
for i in range(365):
    print(s[i].index(max(s[i]))+1)

Solution (Python):
import numpy as np
def read_input():
  D = int(input())
  c = list(map(int, input().split()))
  s = [list(map(int, input().split())) for _ in range(D)]
  return D, c, s
D, c, s = read_input()

for t in np.array(s).argmax(axis=1)+1:
  print(t)

Solution (Python):
j = 0
for i in range(365):
  j += 1
  print(j)
  if j == 26:
    j = 0

Solution (Python):
import  numpy as np
D = int(input())
c = np.array(list(map(int, input().split())))
s = [list(map(int, input().split())) for _ in range(D)]
last_d = [0]*len(c)

ans = 0
for i in range(D):
  max_s = max(s[i])
  max_s_index = np.argmax(s[i])
  max_c = max(c)
  max_c_index = np.argmax(c)
  if max_s >= max_c:
    print(max_s_index+1)
    ans += max_s
    cc = c*(i+1)
    cc[max_s_index] = c[max_s_index]
    for j in cc:
      ans -= cc
  else:
    print(max_c_index + 1)
    ans += s[i][max_c_index]
    cc = c*(i+1)
    cc[max_c_index] = c[max_c_index]
    for j in cc:
      ans -= cc

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

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

Solution (Python):
d=int(input())
c=list(map(int,input().split()))
s=[]
for i in range(d):
    t=list(map(int,input().split()))
    s.append(t)
for i in range(d):
    print(i%26+1)

Solution (Python):


import sys
input=sys.stdin.readline

def main():
    D=int(input())
    C=list(map(int,input().split()))
    S=[list(map(int,input().split())) for i in range(D)]
    last=[[0]*27 for i in range(D+1)]
    for day in range(1,D+1):
        maxt=0
        maxx=0
        sat=0
        for t in range(1,27):
            for j in range(day,D+1):
                    last[j][t]=day
            sat+=S[day-1][t-1]
            for j in range(1,27):
                sat-=C[j-1]*(day-last[day][j])
            if maxx<sat:
                maxt=t
                maxx=sat
        print(maxt)
    
if __name__=="__main__":
    main()

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

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(1)
				break

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



if __name__ == "__main__":
	main()

Solution (Python):
import sys
sys.setrecursionlimit(300000)
from collections import defaultdict

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


D = I()
C = LMI()
S = [LMI() for _ in range(D)]

last = defaultdict(int)
ans = 0
for d in range(D):
    m = -INF
    ans = -1
    for i in range(26):
        lans = S[d][i]
        for j in range(26):
            if i == j:
                lans -= C[j] * (d + 1 - d - 1)
            else:
                lans -= C[j] * (d + 1 - last[j])
        if lans > m:
            m = lans
            ans = i
    print(ans + 1)

Solution (Python):
D,*CS = map(int, open(0).read().split())
C = CS[:26]
S = [CS[26*i:26*(i+1)] for i in range(1, D+1)]

def imax(xs):
    m = -1
    i = 0
    for j, x in enumerate(xs):
        if x > m:
            i = j
            m = x
    return i

for d in range(D):
    i = imax(S[d])
    print(i + 1)

Solution (Python):
D=int(input())
c=list(map(int,input().split()))
s=[list(map(int,input().split())) for i in range(D)]
last=[[0 for j in range(26)] for i in range(D)]
manzokudo=0
for d in range(D):
    k=0
    manzokudomax=-10**30
    nowmanzoku=manzokudo
    for i in range(26):
        if d!=0:
            last[d][i]=last[d-1][i]
    for j in range(26):
        tmp=last[d][j]
        last[d][j]=d+1
        nowmanzoku+=s[d][j]
        for i in range(26):
            nowmanzoku-=c[i]*(d+1-last[d][i])
        if nowmanzoku>manzokudomax:
            k=j
            manzokudomax=nowmanzoku
        last[d][j]=tmp
    for i in range(26):
        if d!=0:
            last[d][i]=last[d-1][i]
    last[d][k]=d+1
    nowmanzoku+=s[d][k]
    for i in range(26):
        nowmanzoku-=c[i]*(d+1-last[d][i])
    manzokudo=nowmanzoku
    print(k+1)

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

Solution (Python):


import random as ra
import copy
import time

start_time = time.time()

D = int(input())
c = list(map(int,input().split()))
s = [list(map(int,input().split())) for i in range(D)]
t = [ra.randint(1,26) for i in range(D)]




def cal_point(t):
    score = 0
    last = [0]*26
    for d in range(D):
        score += s[d][t[d]-1]
        last[t[d]-1] = d+1
        for i in range(26):
            score -= c[i]*(d+1-last[i])
    
    return score
max_score = 0
optimal_t = copy.deepcopy(t)

while (time.time()-start_time)<1.9:

    d = ra.randint(1,D)
    q = ra.randint(1,26)
    t[d-1] = q
    now = cal_point(t)
    if now > max_score:
        optimal_t = copy.deepcopy(t)
        max_score = now

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

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 d in range(D):
    stack = []
    for i in range(26):
        if (d-last[i])*c[i]<0:
            stack.append(i)
    if stack:
        tmp, res = 0, 0
        for i in stack:
            if tmp<s[d][i]:
                tmp, res = s[d][i], i
        last[res] = d
        print(res+1)
    else:
        tmp, res = 0, 0
        for i in range(26):
            if tmp<s[d][i]:
                tmp, res = s[d][i], i
        last[res] = d
        print(res+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(26):
    print(i+1)
for i in range(26, d):
    print(s[i].argmax()+1)

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
import random
import time
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    def score(t):
        n = 26
        v = 0
        minus = sum_ = sum(c)
        last = [0]*n
        for i in range(d):
            ti = t[i]-1
            minus -= (i+1-last[ti])*c[ti]
            v += s[i][ti]-minus
            minus += sum_
            last[ti] = i+1
        return v
    start = time.time()
    d = I()
    c = LI()
    s = LIR(d)
    n = 26
    t = [(i%n)+1 for i in range(d)]
    v = score(t)
    while time.time() < 1.5+start:
        nt = [None]*d
        for i in range(d):
            nti = t[i]
            r = random.random()
            if r > 0.8:
                if r > 0.9:
                    if nti < n:
                        nti += 1
                else:
                    if nti > 1:
                        nti -= 1
            nt[i] = nti
        nv = score(nt)
        if v < nv:
            t = [i for i in nt]
    for i in t:
        print(i)
    return


if __name__ == "__main__":
    solve()

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):
  TEMP = -float('inf')
  T = -1
  for t in range(26):
    temp = 0
    temp += s[i][t-1]
    tempo = last[t-1]
    last[t-1] = i
    temp -= sum([c[j]*(i-last[j]) for j in range(26)])
    if temp > TEMP:
      T = t
      TEMP = temp
    last[t-1] = tempo
  print(T+1)
  last[T-1] = i
  ans += TEMP

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

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

last = [-1] * 26
S = 0
for d in range(D):
    
    M = -float('inf')
    for tt in range(26):
        _last = last[:]
        tmp = s[d][tt]

        _last[tt] = d
        for i in range(26):
            tmp -= c[i] * (d - _last[i])

        if tmp > M:
            M = tmp
            M_tt = tt


    S += s[d][M_tt]

    last[M_tt] = d
    for i in range(26):
        S -= c[i] * (d - last[i])

    print(M_tt + 1)

Solution (Python):
if __name__ == '__main__':
    from sys import stdin
    
    
    
    
    
    
    
    input = stdin.readline

    CONTEST_NUM = 26
    INFTY = 10**9

    d = int(input())
    cc = [0]+list(map(int, input().split()))
    ss = [[0]*(CONTEST_NUM+1) for _ in range(d)]
    for i in range(d):
        ss[i] = [0]+list(map(int, input().split()))

    last_day = [-1]*(CONTEST_NUM+1)
    content = 0

    def count_discontent(content, date):
        for contest in range(1, CONTEST_NUM+1):
            content -= cc[contest]*(date-last_day[contest])
        return content

    for date in range(d):
        
        point = -INFTY
        for contest in range(1, CONTEST_NUM+1):
            get_point = ss[date][contest]+cc[contest]*(date-last_day[contest])
            if get_point > point:
                point = get_point
                t = contest

        content += ss[date][t]
        last_day[t] = date
        content = count_discontent(content, date)
        print(t)

Solution (Python):
def resolve():
    D = int(input())
    cost = list(map(int, input().split()))
    sat = [list((map(int, input().split()))) for _ in range(D)]
    last = [0]*26

    for i in range(D):
        maxcost = 0
        ans = 0
        for j in range(26):
            if maxcost <= sat[i][j]:
                ans = j+1
                maxcost = sat[i][j]
        print(ans)
resolve()

Solution (Python):
import sys
T = 26


def solve(d, c, s):
    best = [0] * d
    last = [-1]*T

    for i in range(d):
        max_v = -float('inf')
        for j in range(T):
            v = s[i][j] + c[j] * (i - last[j])
            if max_v < v:
                max_v = v
                best[i] = j
        last[best[i]] = i
    return best


def get_score(d, c, s, t):
    last = [-1]*T
    total = 0
    for i in range(d):
        total += s[i][t[i]]
        last[t[i]] = i
        for j in range(T):
            total -= c[j] * (i - last[j])
    return max(10**6+total, 0)


def main():
    d = int(input())
    c = list(map(int, input().split()))
    s = [list(map(int, input().split())) for i in range(d)]
    t = solve(d, c, s)
    print(get_score(d, c, s, t), file=sys.stderr)
    for i in range(d):
        print(t[i]+1)


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())))
  print(i%26+1)

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

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

last = {n: 0 for n in range(1, 27)}
ans = []
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
    ans.append(max_i)
    last[max_i] = day
for a in ans:
    print(a)

Solution (Python):
import numpy as np
D = int(input())
C = np.array(input().split(), dtype=int)
S = tuple(tuple(map(int, input().split())) for _ in range(D))

last = np.ones(26, dtype=int)

for s in S:
    s = np.array(s)
    tmp = s + C * last
    i = np.argmax(tmp)
    last[i] = 0
    last += 1
    print(i + 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())))

last = [0] * 26
for d in range(D):
    max = 0
    argmax = -1
    for t in range(26):
        if max < s[d][t]:
            max = s[d][t]
            argmax = t
    print(argmax + 1)

Solution (Python):
import copy

def calc(T):
    res = 0
    L = [0]*26
    for i in range(D):
        res += S[i][T[i]-1]
        L[T[i]-1] = i+1
        for j in range(26):
            res -= C[j]*(i+1-L[j])
    return res
    
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

p = calc(T)
for i in range(D):
    for j in range(26):
        temp = copy.deepcopy(T)
        temp[i] = j+1
        newp = calc(temp)
        if p < newp:
            T[i] = j+1
            p = newp

for t in T:
    print(t)

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):
        l = s[i]
        for j in range(26):
            lst[j] += c[j]
            l[j] += lst[j]
        ind = l.index(max(l))
        print(ind + 1)
        lst[ind] = 0




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


total_manzoku=0
for i in range(1,d+1):
    tmp_max=-10**10
    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)
    total_manzoku+=max(tmp_max,0)
    last[tmp_choice]=i

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

ts = []
for i in range(D):
    t = 1
    ts.append(t)

for t in ts:
    print(t)

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


results = []
for d in range(D):
    s_row = S[d]
    max_value = max(s_row)
    max_index = s_row.index(max_value)
    results.append(max_index+1)

for result in results:
    print(result)

Solution (Python):
import random
import math
D = int(input())
c = input()
for _ in range(D):
    s = input()
    t = math.floor(26 * random.random()) +1
    print(t)

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]) - s[i][j]
  min_idx = calc.index(max(calc))
  last[min_idx] = day
  print(min_idx + 1)

Solution (Python):

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

d = []

for i in range(D):
    s = list(map(int, input().split()))
    rate = 0
    type = 0
    for j in range(len(s)):
        if (rate < s[j]):
            rate = s[j]
            type = j + 1
    d.append(type)

for i in range(len(d)):
    print(d[i])

Solution (Python):


import sys
read = sys.stdin.read
readline = sys.stdin.readline
import time


D, = map(int,readline().split())

*c, = map(int,readline().split())
s = tuple(tuple(map(int,readline().split())) for _ in range(D))

def output(ans):
    for i in ans: print(i+1)

def score(c,s,ans): 
    last = [-1]*26
    score = 0
    for i, ai in enumerate(ans):
        score += s[i][ai]
        last[ai] = i
        for ci,li in zip(c,last):
            score -= ci*(i-li)
        
    return score


ans = [max(range(26),key=lambda x: si[x]) for si in s]

output(ans)

Solution (Python):
D = int(input())
C = list(map(int, input().split()))
S = [list(map(int, input().split())) for _ in range(D)]
E = [-1] * 26
for i in range(D):
    ans = -1
    max_v = -float("inf")
    for j in range(26):
        tmp = S[i][j] - (C[j] * (i-E[j]))
        if tmp > max_v:
            ans = j + 1
            max_v = tmp
    E[ans-1] = i
    print(ans)

Solution (Python):
M = 0
D = int(input())
*c, = map(int, input().split())
S = []
for _ in [None] * D:
    *s, = map(int, input().split())
    S += s,
last = [-1] * 26

def check():
    for d in range(D):
        t = int(input())
        M += S[d][t - 1]
        last[t - 1] = d
        M -= sum((d - last[i]) * c[i] for i in range(26))
        print(M)

INF = float("inf")
for d in range(D):
    m = -INF
    for j in range(26):
        Q = S[d][j] - sum((d - last[i]) * c[i] for i in range(26) if i != j)
        if m < Q:
            t, m = j, Q
    print(t + 1)
    last[t] = d
    M += m

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()))
  
  
  fin = False
  for j in range(len(last_submit)):
    if i - last_submit[j] >= 52:
      print(j + 1)
      last_submit[j] = i
      fin = True
      break
  if fin:
    continue
  for j in range(len(S)):
    S[j] = (S[j],j)
  S = sorted(S, key = lambda x:x[0], reverse = True)
  topval = S[0][0]
  for j in range(len(S)):
    val = S[j][0]
    if val < topval // 2:
      continue 
    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):
d=int(input())
c=list(map(int,input().split()))
s = [list(map(int,input().split())) for i in range(d)]
last = [0 for i in range(26)]
dcl_init = -sum(c)
dcl = dcl_init
satis = 0
for i in range(1,d+1):
  dcl += dcl_init
  ans = 0
  satis_temp = satis - dcl + c[0] + s[i-1][0]
  for j in range(1,26):
    if satis_temp < satis - dcl + c[j] + s[i-1][j]:
      satis_temp = satis - dcl + c[j] + s[i-1][j]
      ans = j
  satis = satis_temp
  dcl += c[ans]
  print(ans+1)

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

last = [0] * 26
manzoku = [0] * 26
for i in range(D):
    for j in range(26):
        if last[j] != 0:
            manzoku[j] -= c[j] * (i - last[j])
        last[s[i].index(max(s[i]))] = i
        manzoku[s[i].index(max(s[i]))] += max(s[i])
    print(manzoku.index(max(manzoku)) + 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=1
 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)

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

never_held = []
for i, c in enumerate(C):
    if (c == 0):
        never_held.append(i+1)
contest = 0
for _ in range(D):
    while (contest % 26 + 1 in never_held):
        contest += 1
    print(contest % 26 + 1)
    contest += 1

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

last=[-1]*26

for i in range(d):
    m=-10**9
    change=-1
    for j in range(26):
        temp=0
        temp+=s[i][j]
        for k in range(26):
            if k!=j:
                temp-=c[k]+(i-last[k])
        if temp>m:
            m=temp
            change=j
    print(change+1)

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

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

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(s_l[i].index(max(s_l[i]))+1)

Solution (Python):
def _calc_today_max(today, Ci, Sdi, last_day):
    today_total_bad_value = \
        sum([Ci[contest] * today + 1 - last_day[contest] for contest in range(26)])

    max_value = -999999999
    max_context = 0
    for contest in range(26):
        today_contest_value = Sdi[today][contest]
        today_bad_value = today_total_bad_value - Ci[contest]
        today_value = today_contest_value - today_bad_value
        if max_value < today_value:
            max_value = today_value
            max_context = contest
    return max_context


def _main(D, Ci, Sdi):
    last_day = [0] * 26
    for today in range(D):
        max_contest = _calc_today_max(today, Ci, Sdi, last_day)
        print(max_contest + 1)
        last_day[max_contest] = today + 1


def _execute():
    D = int(input())
    Ci = list(map(int, input().split()))
    Sdi = []
    for i in range(D):
        Sdi.append(list(map(int, input().split())))
    _main(D, Ci, Sdi)


if __name__ == "__main__":
    _execute()

Solution (Python):
for i in range(365):
  print((i%26)+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):
d = int(input())
cl = list(map(int, input().split()))
sl = []
for _ in range(d):
    sl.append(list(map(int, input().split())))

tl = []



last_di = [-1]*26
ans = 0
for day in range(d):
    best_t = 0
    best_t_val = 0
    for t in range(26):
        curr_val = sl[day][t]
        for i in range(26):
            if i == t: continue
            curr_val -= (day-last_di[i])*cl[i]
        if curr_val >= best_t_val:
            best_t = t
            best_t_val = curr_val
    tl.append(best_t+1)
    last_di[best_t] = day

for t in tl:
    print(t)

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

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

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

Solution (Python):
def resolve():
    import numpy as np
    d = int(input())
    C = list(map(int, input().split()))
    S = []
    for _ in range(d):
        _S = list(map(int, input().split()))
        S.append(_S)
    S = np.array(S)

    for i in range(d):
        max_idx = np.argmax(S[i])
        print(max_idx + 1)

resolve()