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):
'''
Introduction to Heuristics Contest
A - AtCoder Contest Scheduling
'''

def main():
    
    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)
    '''

    ''' 満足度Siの最高を選ぶ、満足度低下するCは未考慮 '''
    for i in range(D):
        high = S[i].index(max(S[i])) + 1
        print(high)

main()

Solution (Python):
import sys

D = int(input())
C = list(map(int, sys.stdin.readline().rsplit()))
S = [list(map(int, sys.stdin.readline().rsplit())) for _ in range(D)]

d = [0] * 26
res = 0
for i in range(D):
    index = max(enumerate(S[i]), key=lambda x: x[1])[0]
    print(index + 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):
import numpy as np

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

T = []
last = np.zeros(26)

for i in range(D):
  score = S[i, :] - (i-last)*np.array(c)
  argmax = score.argmax()
  t = argmax+1
  last[t-1] = i
  print(t)

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):
import random
D = int(input())
listC = list(map(int, input().split()))
answerL = []
numL = list(range(25))
for i in range(D):
    print(random.choice(numL)+1)

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

Last = [-1] * 26


for d in range(D):
    S = SS[d]
    t = -1
    x = -1e100
    for i, s in enumerate(S):
        score = s - sum(c * d - (max(last, 0)) for c, last in zip(C, Last))
        if score > x:
            x = score
            t = i

    print(t + 1)

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

Solution (Python):
import random
d = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for _ in range(d)]
ans = 0
last = [0]*26
for i in range(1,d+1):
    x = random.randrange(26)
    print(x+1)

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


def inpl():
    return list(map(int, input().split()))


def count_v(last_d, C, S, t, d):
    ret = S[t - 1]
    last_d[t - 1] = d
    for i in range(len(last_d)):
        ret -= C[i] * (d - last_d[i])
    return ret


def count_v_virtual(last_d, C, S, t, d):
    ret = S[t - 1]
    tmp = last_d[t - 1]
    last_d[t - 1] = d
    for i in range(len(last_d)):
        ret -= C[i] * (d - last_d[i])
    last_d[t - 1] = tmp
    return ret


def main():
    D = int(input())
    C = inpl()
    Ss = [inpl() for _ in range(D)]
    last_d = [-1] * len(C)

    for d in range(D):
        tmp_t, tmp_v = -1, -float('inf')
        for i in range(len(C)):
            tmp_score = count_v_virtual(last_d, C, Ss[d], i + 1, d)
            if tmp_score > tmp_v:
                tmp_v = tmp_score
                tmp_t = i
        last_d[tmp_t] = d
        print(tmp_t + 1)

    return


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

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)

last = [0] * 26

result = 0

for i in range(d):
    

    

    

    

    print(i % 26 + 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)
    i = 0
    while time.time() < 1.5+start:
        nt = [i for i in t]
        r = random.random()
        if r > 0.5:
            if nt[i] < n:
                nt[i] += 1
        else:
            if nt[i] > 1:
                nt[i] -= 1
        nv = score(nt)
        if v < nv:
            t = [i for i in nt]
            v = nv
        i += 1
        i %= d
    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)]
A = [0 for i in range(26)]
ans = 0
for i in range(D):
  K = []
  for k in range(26):
    t = k+1
    A[t-1] = i+1
    c = 0
    for j in range(26):
      c += C[j] * (i+1-A[j])
    an = S[i][t-1]-c
    K.append([ans + an, t])
  K.sort()
  a = K[-1][1]
  print(a)
  ans = K[-1][0]

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()))
  
  
  if i - min(last_submit) >= 52:
    ind = -1
    for j in range(len(last_submit)):
      if i - last_submit[j] >= 42:
        if ind == -1:
          ind = j
        else:
          if C[ind] < C[j]:
            ind = j
    print(ind + 1)
    last_submit[ind] = i
    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()))
from collections import defaultdict
las=defaultdict(int)
ss=[list(map(int,input().split())) for i in range(d)]

for i in range(d):
    kai=-float("INF")
    ind=0
    for j in range(26):
        if kai<(g:=ss[i][j]-c[j]*(j+1-las[j])):
            kai=g;ind=j
    las[ind]=i+1
    print(ind+1)

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



last_di = [0 for i in range(N)]

def todays_cost(day,contest):
    cost = 0
    for i in range(N):
        cost += c[i] * (day - last_di[i])
    cost -= c[contest - 1] * (day - last_di[contest - 1])
    cost -= s[day - 1][contest - 1]
    return  - cost 

def greedy():
    m = 0
    for i in range(d):
        for j in range(N):
            cost_list[j] = todays_cost(i,j)
        max_value = max(cost_list)
        max_index = cost_list.index(max_value)
        last_di[max_index] = i 
        m += max_value
        print(max_index + 1)

greedy()

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 _ in range(D)])

for si in s:
    print(np.where(si==max(si))[0][0].tolist() + 1)

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


def calc_score(D, C, S, T):
    """
    開催日程Tを受け取ってそこまでのスコアを返す
    """
    contest_last_opened = [0]*26  
    score = 0
    for d, t in enumerate(T, start=1):
        get_score = S[d-1][t-1]
        score += get_score
        contest_last_opened[t-1] = d
        loss_score = 0
        for i in range(26):
            ld = contest_last_opened[i]
            loss_score += C[i]*(d-ld)
        score -= loss_score
    return


def main(D, C, S):
    T = []
    for d in range(1, D+1):
        
        
        today_score = S[d-1][0]
        today_contest = 1
        for i in range(1, 26):
            if today_score < S[d-1][i]:
                today_score = S[d-1][i]
                today_contest = i+1
        T.append(today_contest)
    return T


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)]
    T = main(D, C, S)
    print(*T, sep="\n")

Solution (Python):
from random import randint

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

def scores(tl):
    s = 0
    last = [0]*26
    for d in range(D):
        t = tl[d] - 1
        last[t] = d+1
        s += score(d+1,t,last)
    return s


tl = [randint(1,26)]*D
s = scores(tl)
for _ in range(1000):
    d = randint(1,D)
    q = randint(1,26)
    x = tl[d-1]
    tl[d-1] = q
    s2 = scores(tl)
    if s2>s:
        s = s2
    else:
        tl[d-1] = x


for t in tl:
    print(t)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


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

    for d in range(D):
        ma = res = 0
        for i in range(26):
            s = S[d][i]
            if ma < s:
                ma = s
                res = i + 1
        print(res)


if __name__ == '__main__':
    resolve()

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

score = S[1]
contest = score.index(max(score))

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

print(contest + 1)

for day in range(1, D):
    score = [last[i]*C[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):
d = int(input())
c = list(map(int, input().split()))
s = []
for _ in range(d):
    s.append(list(map(int, input().split())))
t = []
v = 0
last = [-1]*26
for i in range(d):
    bst = -10**10
    for j in range(26):
        tmp = s[i][j]
        for k in range(26):
            if j!=k:
                tmp -= c[k]*(i-last[k])
        if tmp>bst:
            bst = tmp
            bst_idx = j
    last[bst_idx] = i
    t.append(bst_idx+1)
for i in t:
    print(i)

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+10)%26+1)

Solution (Python):
from collections import defaultdict
d = int(input())
c = list(map(int,input().split()))
s = []
for i in range(d):
    s.append(list(map(int,input().split())))
dic = defaultdict(int)
for i in range(1,d+1):
    maxscore = -10000000
    maxcontest = -1
    for k in range(26):
        score = 0
        score += s[i-1][k-1]
        for j in range(26):
            if j != k:
                score -= c[j]*(i-dic[j])
        if score > maxscore:
            maxscore = score
            maxcontest = k
    print(maxcontest+1)
    dic[maxcontest] = i

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):
    results.append((d % 26) + 1)


for result in results:
    print(result)

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

d = int(input())
C = tuple(map(int, input().split()))
S = tuple(tuple(map(int, input().split())) for _ in range(d))
ans = 0
R = [0]*26
for i in range(1, d+1):
  M = -float("inf")
  idx = -1
  for t in range(26):
    L = list(R)
    L[t] = i
    temp = S[i-1][t]
    for j, (c, l) in enumerate(zip(C, L)):
      temp -= c*(i-l)
    if M < temp:
      M = temp
      idx = t
  R[idx] = i
  print(idx+1)

Solution (Python):
def main():
    from sys import stdin
    input = stdin.readline
    from time import time
    from random import randint
    start = time()
    D = int(input())
    c = list(map(int, input().split()))
    s = [list(map(int, input().split())) for _ in [0]*D]
    ans = [randint(0, 25) for _ in [0]*D]

    def calc_score(ans):
        score = 0
        last = [-1]*26
        for d in range(D):
            ct = ans[d]
            score += s[d][ct]
            last[ct] = d
            for j in range(26):
                score -= c[j]*(d-last[j])
        return score

    score = calc_score(ans)

    while True:
        d = randint(0, D-1)
        new_ct = randint(0, 25)
        past_ct = ans[d]
        ans[d] = new_ct
        new_score = calc_score(ans)
        if new_score > score:
            score = new_score
        else:
            ans[d] = past_ct
        if time() > start+1.8:
            break

    for i in ans:
        print(i+1)


main()

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 = []

arr = list(range(1, 27))
C, arr = zip(*sorted(zip(C, arr), reverse=True))
for i in range(D):
    print(arr[i % 26])

Solution (Python):
"""
https://atcoder.jp/contests/intro-heuristics/tasks/intro_heuristics_a
"""

import numpy as np
from numba import jit


@jit(nopython=True, parallel=False)  
def calc(D: np.ndarray, C: np.ndarray, S: np.ndarray) -> np.ndarray:
    play_contests = np.zeros(D)
    today_costs = np.zeros(26)
    for d in range(D):
        today_costs += C
        points = S[d] - C
        best_contest = np.argmax(points)
        play_contests[d] = best_contest
        today_costs[best_contest] = 0

    return np.asarray(play_contests + 1, dtype=np.int32)


def load_input_as_int_array() -> np.ndarray:
    return np.array([int(v) for v in input().split(" ")])


def main() -> None:
    D, = load_input_as_int_array()
    C = load_input_as_int_array()
    S = []
    for _ in range(D):
        S.append(load_input_as_int_array())

    result = calc(D, C, np.array(S))
    for v in result:
        print(v)
    


main()

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):
    ans=0
    for choice in range(1,27):
        ans_tmp=0
        ans_tmp+=s[d-1][choice-1]
        last[choice-1]=d
        for i in range(26):
            ans_tmp-=c[i]*(d-last[i])
        if ans_tmp>ans:
            case=choice
            ans=ans_tmp
    last[case-1]=d
    print(case)

Solution (Python):
import numpy as np

d = int(input())
c = np.array(list(map(int,input().split())))
s = np.array([[int(i) for i in input().split()] for _ in range(d)])
ld = np.zeros(26)

ans = 0

for i in range(d):
    ld += 1
    mi = np.argmax(s[i])
    ld[mi] = 0
    
    
    print(mi+1)

Solution (Python):
N =26

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

last = [-1]*(N)
manzoku = 0

for i in range(0,D,1):
    maximum = 0
    maximum_index = 0
    for j in range(0,26,1):
        if s[i][j]+c[j]*(i-last[j]) > maximum:
            maximum = s[i][j]+c[j]*(i-last[j])
            maximum_index = j
    last[maximum_index] = i

    print(maximum_index+1)

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

for i in range(D):
  val_max = 0
  idx_max = 0
  for j in range(26):
    if val_max < s[i][j]:
      val_max = s[i][j]
      idx_max = j+1
  print(idx_max)

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

    n = c.index(max(c)) + 1

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


if __name__ == "__main__":
    main()

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

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

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    d = int(input())
    c = [int(i) for i in input().split()]
    s = [[int(i) for i in input().split()] for _ in range(d)]
    last = [0] * 26
    for i in range(d):
        t = 0
        score = 0
        for j in range(26):
            sj = s[i][j] + c[j] * last[j]
            if sj > score:
                t = j
                score = sj
        last[t] = 0
        print(t + 1)


if __name__ == '__main__':
    main()

Solution (Python):
D = int(input())
c = [int(i) for i in input().split()]
days = [0]*26
ans = []
for k in range(D):
    s = [int(i) for i in input().split()]
    t = 0
    for i in range(1,26):
        if s[t] + days[t]*c[t] <= s[i] + days[i]*c[i]:
            t = i
    ans.append(t)
    for i in range(26):
        if i == t:
            days[i] = 0
        else:
            days[i] += 1
ans = [str(i+1) for i in ans]
print("\n".join(ans))

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



for d in range(D):
  max_index=-1
  max_sd=-1
  for i in range(26):
    if max_sd<smat[d][i]:
      max_index=i+1
      max_sd=smat[d][i]
      
  print(max_index)

Solution (Python):
def resolve():
    D = int(input())
    C = list(map(int, input().split()))
    S = [list(map(int, input().split())) for _ in range(D)]
    T = []
    last = [0 for _ in range(26)]
    
    def calc(day, typ):
        score = S[day][typ]
        for j in range(26):
            if j == typ:
                continue
            score -= C[j]*(day+1-last[j])
        return score

    for d in range(D):
        maxscore, maxcontest = -float("inf"), None
        for typ in range(26):
            _score = calc(d, typ)
            if maxscore < _score:
                maxscore = _score
                maxcontest = typ
        T.append(maxcontest)
    
    [print(t+1) for t in T]



if __name__ == '__main__':
    resolve()

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,:]*3
    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):
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
t = []
    
ans = 0

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

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

pp = np.zeros(26, dtype=np.int)
  
for i in range(d):
  pp += c
  t = np.argmax(pp)+1
  pp[t-1] = 0
  print(t)

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

Solution (Python):
import sys
import random

sys.setrecursionlimit(500000)
def input():
    return sys.stdin.readline()[:-1]

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




def content(t):
    cont = 0
    last = [0]*26
    for i in range(D):
        cont += s[i][t[i]-1]
        last[t[i]-1] = i+1
        for j in range(26):
            cont -= c[j]*(i+1-last[j])
    return cont

def main():
    t = [random.randint(0,25)+1 for i in range(D)]
    prev = content(t)
    for i in range(100):
        d,q = random.randint(0,D-1), random.randint(0,25)
        prev_t = t[d]
        t[d] = q+1
        if prev>content(t):
            t[d] = prev_t
    print(*t,sep="\n")
        

if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
import random
D = int(input())
c = [int(x) for x in input().split()]
s = []
for _ in range(D):
    s.append([int(x) for x in input().split()])
t = [random.randint(1, 26) for x in range(D)]
last = [0]*26
ans = 0
for i in range(1, D + 1):
    ans += s[i - 1][t[i - 1] - 1]
    last[t[i - 1] - 1] = i
    for j in range(26):
        ans -= c[j]*(i - last[j])
    
print(*t, sep="\n")

Solution (Python):
import numpy as np
import copy

d=int(input())
c=np.array(list(map(int,input().split())))
curc=copy.deepcopy(c)
s=[]
ans=[]
score=0
for i in range(d):
    s=np.array(list(map(int,input().split())))
    curc+=c
    s1=s+(curc)*(d-i)
    
    x=np.argmax(s1)
    ans.append(x+1)
    curc[x]=0
    score+=s[x]
    for j in range(26):
        score-=curc[j]




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

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 i in range(D)]

for s in S:

    print(s.index(max(s))+1)

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
  for d in range(D):
    maxi = 0
    contest = 0
    for i in range(26):
        if S[d][i]>maxi:
            contest = i
            maxi = S[d][i]
    ans[d] = contest+1
  
  return ans
print(*solve(),sep='\n')

Solution (Python):
import numpy as np
d=int(input())
c=list(map(int,input().split()))
TotalLoss=sum(c)
for i in range(26):
  c[i]=TotalLoss-c[i]
c=np.array(c)
s=[]
for i in range(d):
  si=np.array(list(map(int,input().split())))
  s=np.append(s,si)
ans=[]
for i in range(d):
  si=s[i]
  si-=c
  index=np.argmax(si)
  ans.append(index+1)
for i in range(d):
  print(ans[i])

Solution (Python):
D = int(input())
c = list(map(int, input().split()))
s = []
for i in range(D):
  s.append(list(map(int, input().split())))
  
sdictlist = []
sdictlistsorted = []
for i in range(D):
  onedict = {}
  for j in range(26):
    onedict[j] = s[i][j]
  sdictlist.append(onedict)
  onesorteddict = sorted(onedict.items(), key=lambda x:x[1], reverse=True)
  sdictlistsorted.append(onesorteddict)
  
for i in range(D):
  print(sdictlistsorted[i][0][0]+1)

Solution (Python):


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

def maxcontest(s):
    ans = -1
    for i in range(26):
        if ans <= s[i]:
            ans = s[i]
            num = i 
    return num+1

for i in range(d):
    print(maxcontest(s[i]))

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
    ans += best_t_val
    

for t in tl:
    print(t)

Solution (Python):
import sys,collections as cl,bisect as bs
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()

c = l()

s = []
for i in range(d):
	s.append(l())
day = [0 for i in range(26)]

c = [[c[i],i] for i in range(26)]
c.sort(reverse = True)

for i in range(d):
	print(c[i%26][1]+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())))

for i in range(D):
    s = S[i]
    max_s = max(s)
    max_s_index = s.index(max_s)
    print(max_s_index + 1)