Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import random

D=int(input())
C=np.array(list(map(int,input().split())))
last_day=np.array([-1 for _ in range(26)])
score=np.array([list(map(int,input().split())) for _ in range(D)])
output=[0 for _ in range(D)]

#初期貪欲法
for day in range(D):
    today_point=C*(day-last_day)
    S_today=sum(today_point)
    for k in range(26):
        today_point[k]=score[day][k]-S_today+today_point[k]
 
    if day!=D-1:
        max_score=-1*float("inf")
        for k in range(26):
            nday_point=C*((day+1)-last_day)
            S_nday=sum(nday_point)-C[k]*(day-last_day[k])
            
            for i in range(26):
                if k!=i:
                    nday_point[i]=score[day+1][i]-S_nday+nday_point[i]
                else:
                    nday_point[i]=score[day+1][i]-S_nday+C[i]
 
                if today_point[k]+nday_point[i]>max_score:
                    max_score=today_point[k]+nday_point[i]
                    idx=k
    else:
        idx=np.argmax(today_point)
    
    last_day[idx]=day
    output[day]=idx+1

def score_cal(output):
    ans=0
    memo=np.array([-1 for _ in range(26)])
    for day in range(D):
        t=output[day]-1
        memo[t]=day
        tmp=C*(memo-day)
        ans=ans+score[day][t]+sum(tmp)
    return ans

  
random_day=[i for i in range(D)]
random_con=[i+1 for i in range(26)]


for i in range(2000):
    tmp_output=output[:]
    d=random.choice(random_day)
    con=random.choice(random_con)
    tmp_output[d]=con
    
    if score_cal(tmp_output)>score_cal(output):
        output[d]=con

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

Fixed submission:
import numpy as np
ans=0
D=int(input())
C=np.array(list(map(int,input().split())))
last_day=np.array([0 for _ in range(26)])

for day in range(1,D+1):
    score=np.array(list(map(int,input().split())))
    tmp=C*(last_day-day)
    #今回行うコンテストで得られる
    idx=np.argmax(tmp+score)
    # ans=ans+score[idx]+np.sum(tmp)+abs(tmp[idx])
    last_day[idx]=day
    print(idx+1)

Buggy python submission (verdict: Runtime Error):
import numpy as np
ans=0
D=int(input())
C=np.array(list(map(int,input().split())))
last_day=np.array([-1 for _ in range(26)])
score=np.array([list(map(int,input().split())) for _ in range(D)])
 
for day in range(D):
    today_point=C*(day-last_day)
    S_today=sum(today_point)
    for k in range(26):
        today_point[k]=score[day][k]-S_today+today_point[k]
 
    if day!=D-1:
        max_score=-1*float("inf")
        for k in range(26):
            nday_point=C*((day+1)-last_day)
            S_nday=sum(nday_point)-C[k]*(day-last_day[k])
            
            for i in range(26):
                if k!=i:
                    nday_point[i]=score[day+1][i]-S_nday+nday_point[i]
                else:
                    nday_point[i]=score[day+1][i]-S_nday+C[i]
 
                if today_point[k]+nday_point[i]>max_score:
                    max_score=today_point[k]+nday_point[i]
                    idx=k
    else:
        idx=np.argmax(today_point)
 
    last_day[idx]=day
    output[day]=idx+1
print(*output)

Fixed submission:
import numpy as np
ans=0
D=int(input())
C=np.array(list(map(int,input().split())))
last_day=np.array([0 for _ in range(26)])

for day in range(1,D+1):
    score=np.array(list(map(int,input().split())))
    tmp=C*(last_day-day)
    #今回行うコンテストで得られる
    idx=np.argmax(tmp+score)
    # ans=ans+score[idx]+np.sum(tmp)+abs(tmp[idx])
    last_day[idx]=day
    print(idx+1)

Buggy python submission (verdict: Time Limit Exceeded):

import numpy as np
ans=0
D=int(input())
C=np.array(list(map(int,input().split())))
last_day=np.array([-1 for _ in range(26)])
score=np.array([list(map(int,input().split())) for _ in range(D)])

for day in range(D):
    today_point=C*(day-last_day)
    S_today=sum(today_point)
    for k in range(26):
        today_point[k]=score[day][k]-S_today+today_point[k]

    if day<D-2:
        max_score=-1*float("inf")
        for k in range(26):
            nday_point=C*((day+1)-last_day)
            S_nday=sum(nday_point)-C[k]*(day-last_day[k])
            
            for i in range(26):
                if k!=i:
                    nday_point[i]=score[day+1][i]-S_nday+nday_point[i]
                else:
                    nday_point[i]=score[day+1][i]-S_nday+C[i]

                if today_point[k]+nday_point[i]>max_score:
                    max_score=today_point[k]+nday_point[i]
                    idx=k

                nnday_point=C*((day+2)-last_day)
                S_nnday=sum(nnday_point)-C[k]*(day+1-last_day[k])

                for t in range(26):
                    if t!=i:
                        nnday_point[i]=score[day+2][t]-S_nnday+nnday_point[i]
                    else:
                        nnday_point[i]=score[day+2][t]-S_nnday+C[i]

                    if today_point[k]+nday_point[i]+nnday_point[t]>max_score:
                        max_score=today_point[k]+nday_point[i]+nnday_point[t]
                        idx=k
    else:
        idx=np.argmax(today_point)

    last_day[idx]=day
    print(idx+1)


Fixed submission:
import numpy as np
ans=0
D=int(input())
C=np.array(list(map(int,input().split())))
last_day=np.array([0 for _ in range(26)])

for day in range(1,D+1):
    score=np.array(list(map(int,input().split())))
    tmp=C*(last_day-day)
    #今回行うコンテストで得られる
    idx=np.argmax(tmp+score)
    # ans=ans+score[idx]+np.sum(tmp)+abs(tmp[idx])
    last_day[idx]=day
    print(idx+1)

Buggy python submission (verdict: Runtime Error):
import numpy as np
ans=0
D=int(input())
C=np.array(list(map(int,input().split())))
last_day=np.array([0 for _ in range(26)])

for day in range(1,D+1):
    score=np.array(list(map(int,input().split())))
    tmp=C*(last_day-day)
    #今回行うコンテストで得られる
    idx=np.argmax(tmp+score)
    # ans=ans+score[idx]+np.sum(tmp)+abs(tmp[idx])
    # last_day[idx]=day
    print(idx+1)

Fixed submission:
import numpy as np
ans=0
D=int(input())
C=np.array(list(map(int,input().split())))
last_day=np.array([0 for _ in range(26)])

for day in range(1,D+1):
    score=np.array(list(map(int,input().split())))
    tmp=C*(last_day-day)
    #今回行うコンテストで得られる
    idx=np.argmax(tmp+score)
    # ans=ans+score[idx]+np.sum(tmp)+abs(tmp[idx])
    last_day[idx]=day
    print(idx+1)

Buggy python submission (verdict: Runtime Error):
import numpy as np
ans=0
D=int(input())
C=np.array(list(map(int,input().split())))
last_day=np.array([0 for _ in range(26)])
print(C)
for day in range(1,D+1):
    score=np.array(list(map(int,input().split())))
    tmp=C*(last_day-day)
    #今回行うコンテストで得られる
    idx=np.argmax(tmp+score)
    # ans=ans+score[idx]+np.sum(tmp)+abs(tmp[idx])
    # last_day[idx]=day
    print(idx+1)

Fixed submission:
import numpy as np
ans=0
D=int(input())
C=np.array(list(map(int,input().split())))
last_day=np.array([0 for _ in range(26)])

for day in range(1,D+1):
    score=np.array(list(map(int,input().split())))
    tmp=C*(last_day-day)
    #今回行うコンテストで得られる
    idx=np.argmax(tmp+score)
    # ans=ans+score[idx]+np.sum(tmp)+abs(tmp[idx])
    last_day[idx]=day
    print(idx+1)