Buggy python submission (verdict: Time Limit Exceeded):
if __name__ == '__main__':
    from sys import stdin
    # from collections import defaultdict
    # from collections import deque
    # from collections import Counter
    from copy import deepcopy
    # import numpy as np
    from numpy import random as np_random
    # import math
    import random
    import time
    input = stdin.readline

    CONTEST_NUM = 26
    INFTY = 10**9
    START = time.time()
    LIMIT = START + 1.95

    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

    def greedy_decide_contest(date):
        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
        return t

    tt = [0]*D
    for date in range(D):
        # t = int(input())
        t = greedy_decide_contest(date)
        tt[date] = t
        content += ss[date][t]
        last_day[t] = date
        content = count_discontent(content, date)
        # print(t)

    best_content = content
    best_tt = deepcopy(tt)

    P = 0.1

    while time.time() <= LIMIT:
        content = 0
        tt = [0]*(D)
        for date in range(D):
            if np_random.binomial(1, P):
                t = random.randint(1, CONTEST_NUM)
            else:
                t = greedy_decide_contest(date)
            tt[date] = t
            content += ss[date][t]
            last_day[t] = date
            content = count_discontent(content, date)
        if content > best_content:
            best_content = content
            best_tt = deepcopy(tt)
    
    # print(best_content)

    for t in tt:
        print(t)

    
    """m = int(input())
    for _ in range(m):
        d, q = map(int, input().split())
        ss_d = ss[d]
        content += (ss_d[q]-ss_d[tt[d]])
        tt[d] = q
      """      




Fixed submission:
if __name__ == '__main__':
    from sys import stdin
    # from collections import defaultdict
    # from collections import deque
    # from collections import Counter
    # import copy
    # import numpy as np
    # import math
    # import random
    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):
        # t = int(input())
        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)