import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdlib, std.datetime;

immutable int N = 26;
//immutable int D = 365;
int D;
long[] C;
long[][] S;

void main() {
    auto stattime = Clock.currTime();
    D = readln.chomp.to!int;
    C = readln.split.map!(to!long).array;
    S = iota(D).map!(_ => readln.split.map!(to!long).array).array;

    auto ans = new int[](D);
    auto prev = new int[](N);
    prev[] = -1;

    foreach (i; 0..D) {
        int best_idx = -1;
        long best_score = -(1L << 59);
        foreach (j; 0..N) {
            long minus = (i - prev[j]) * C[j];
            long plus = S[i][j];
            long score = minus + plus;
            if (score >= best_score) {
                best_score = score;
                best_idx = j;
            }
        }
        ans[i] = best_idx;
    }

    ans.each!(a => writeln(a + 1));
}
