#include <bits/stdc++.h>
using namespace std;

#define REP(i,m,n) for(int i=(m); i<(int)(n); i++)
#define RREP(i,m,n) for(int i=(int)(n-1); i>=m; i--)
#define rep(i,n) REP(i,0,n)
#define rrep(i,n) RREP(i,0,n)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define fi first
#define se second
#define debug(...) {cerr<<"[L"<<__LINE__<<"] "; _debug(__VA_ARGS__);}

template<typename T>
string join(const vector<T>&v, string del=", "){ stringstream s;
    for(auto x : v) s << del << x; return s.str().substr(del.size());
}
template<typename T>
ostream& operator<<(ostream& o, const vector<T>&v){
    if(v.size()) o << "[" << join(v) << "]"; return o;
}
template<typename T>
ostream& operator<<(ostream& o, const vector<vector<T> >&vv){
    int l = vv.size();
    if(l){ o<<endl; rep(i,l) o << (i==0 ? "[ " : ",\n  " ) << vv[i] << (i==l-1 ? " ]" : ""); }
    return o;
}
inline void _debug(){cerr<<endl;}
template<class First, class... Rest>
void _debug(const First& first, const Rest&... rest){cerr<<first<<" ";_debug(rest...);}

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;

const double PI = (1*acos(0.0));
const double EPS = 1e-9;
const int INF = 0x3f3f3f3f;
const ll INFL = 0x3f3f3f3f3f3f3f3fLL;
const ll mod = 1e9 + 7;

inline void finput(string filename) {
    freopen(filename.c_str(), "r", stdin);
}

int N;
int D;
vi c;
vvi cs;
vvi s;
chrono::system_clock::time_point start;
ll calc_score(vi t){
    ll res = 0;
    vi last(N, 0);
    rep(i,D){
        res += s[i][t[i]];
        last[t[i]] = i+1;
        rep(j,N){
            res -= c[j] * (i+1 - last[j]);
        }
    }
    return res;
}

ll calc_diff(vi t, vi pt){
    ll res = 0;
    vi last(N, 0);
    rep(i,D){
        res += s[i][t[i]];
        last[t[i]] = i+1;
        rep(j,N){
            res -= c[j] * (i+1 - last[j]);
        }
    }
    return res;
}

vi greedy(){
    vi t(D);
    vi last(N, 0);
    rep(i,D){
        int idx = 0;
        int score = 0;
        rep(j,N){
            int jscore = s[i][j] + (c[j] * (i+1 - last[j]));
            if(score < jscore){
                score = jscore;
                idx = j;
            }
        }
        t[i] = idx;
        last[idx] = i + 1;
    }
    return t;
}


void search(){
    vi t = greedy();
    vector<multiset<int>> last(N);
    rep(i,N) last[i].insert(0);
    rep(i,D) last[t[i]].insert(i+1);
    while(1){
        auto now = chrono::system_clock::now();
        double elapsed = chrono::duration_cast<chrono::milliseconds>(now-start).count();
        random_device rnd;
        int day = rnd() % D;
        int con = rnd() % N;
        if(t[day] == con) continue;

        int diff = s[day][con] - s[day][t[day]];
        auto pre = lower_bound(all(last[t[day]]), day+1);
    }
}

int main(){
    ios_base::sync_with_stdio(0);
    // finput("./tester/data/test1.in");
    start = chrono::system_clock::now();
    N = 26;
    cin >> D;
    c = vi(N);
    cs = vvi(D+1, vi(N));
    s = vvi(D, vi(N));
    rep(i,N) cin >> c[i];
    rep(i,D) rep(j,N) cin >> s[i][j];
    rep(i,D) rep(j,N) cs[i+1][j] = cs[i][j] + c[j];

    vi t = greedy();
    // ll score = calc_score(t);

    for(auto ti : t){
        cout << ti+1 << endl;
    }
    return 0;
}

Measured memory_bytes: 3768