#include <algorithm>
#include <array>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define REP(i,n) for(int i = 0; i < (int)(n); ++i)
#define FOR(i,a,b) for(int i = (a); i < (int)(b); ++i)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(v) ((int)v.size())
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b; return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b; return true;
    }
    return false;
}
template<int MOD> struct Fp {
    ll val;
    constexpr Fp(ll v = 0) noexcept : val(v % MOD) {
        if (val < 0) val += MOD;
    }
    constexpr int getmod() { return MOD; }
    constexpr Fp operator - () const noexcept {
        return val ? MOD - val : 0;
    }
    constexpr Fp operator + (const Fp& r) const noexcept { return Fp(*this) += r; }
    constexpr Fp operator - (const Fp& r) const noexcept { return Fp(*this) -= r; }
    constexpr Fp operator * (const Fp& r) const noexcept { return Fp(*this) *= r; }
    constexpr Fp operator / (const Fp& r) const noexcept { return Fp(*this) /= r; }
    constexpr Fp& operator += (const Fp& r) noexcept {
        val += r.val;
        if (val >= MOD) val -= MOD;
        return *this;
    }
    constexpr Fp& operator -= (const Fp& r) noexcept {
        val -= r.val;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr Fp& operator *= (const Fp& r) noexcept {
        val = val * r.val % MOD;
        return *this;
    }
    constexpr Fp& operator /= (const Fp& r) noexcept {
        ll a = r.val, b = MOD, u = 1, v = 0;
        while (b) {
            ll t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        val = val * u % MOD;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr bool operator == (const Fp& r) const noexcept {
        return this->val == r.val;
    }
    constexpr bool operator != (const Fp& r) const noexcept {
        return this->val != r.val;
    }
    friend constexpr ostream& operator << (ostream &os, const Fp<MOD>& x) noexcept {
        return os << x.val;
    }
    friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, ll n) noexcept {
        if (n == 0) return 1;
        auto t = modpow(a, n / 2);
        t = t * t;
        if (n & 1) t = t * a;
        return t;
    }
};
constexpr ll MOD = 1e9 + 7;
using mint = Fp<MOD>;

#define pb push_back
#define mp make_pair
#define mt make_tuple

int D;
array<ll, 26> Cs;
vector<vector<ll>> Ss;

// http://shindannin.hatenadiary.com/entry/20121224/1356364040
unsigned int randxor()
{
    static unsigned int x=123456789,y=362436069,z=521288629,w=88675123;
    unsigned int t;
    t=(x^(x<<11));x=y;y=z;z=w; return( w=(w^(w>>19))^(t^(t>>8)) );
}

struct Answer {
    Answer() {
        m_lastdays.resize(26, 0);
    }

    vector<int> m_contests;
    vector<int> m_lastdays;
    ll m_tempscore = 0;
    ll m_day = 0;

    void add_contest(int contest) {
        m_tempscore += Ss[m_day][contest];
        m_lastdays[contest] = m_day + 1;
        REP(c, 26) {
            m_tempscore -= Cs[c] * ((ll)(m_day + 1) - m_lastdays[c]);
        }
        m_day += 1;
        m_contests.push_back(contest);  
        //cout << "m_tempscore = " << m_tempscore << endl;
    }


    ll calc_score_init() {
        assert(SIZE(m_contests) == D);
        ll ans = 0;

        vector<int> lastdays(26);

        REP(d, D) {
            auto contest = m_contests[d];
            ans += Ss[d][contest];
            lastdays[contest] = d + 1;
            REP(c, 26) {
                ans -= Cs[c] * ((ll)(d + 1) - lastdays[c]);
            }
            //cerr << "temp score: " << ans << endl;
        }
        return max(0LL, 1000000 + ans);
    }
    void print_contests() {
        REP(d, D) {
            cout << m_contests[d] + 1 << endl;
        }
    }
};

int main(void)
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    auto start = std::chrono::system_clock::now();

    cin >> D;
    REP(i, 26) cin >> Cs[i];

    Ss.resize(D);
    REP(i, D) {
        Ss[i].resize(26);
        REP(j, 26) {
            cin >> Ss[i][j];
        }
    }

    Answer ans;

    REP(d, D) {
        ll temp_best = ll(-1e18);
        ll next_c = -1;
        REP(c, 26) {
            Answer ans2 = ans;
            ans2.add_contest(c);
            if (ans2.m_tempscore > temp_best) {
                next_c = c;
                temp_best = ans2.m_tempscore;
            }
        }
        ans.add_contest(next_c);

        //ans.add_contest(d % 26);
    }

    auto best_score = ans.calc_score_init();
    cerr << "score:" << best_score << endl;

    Answer best_ans;

    ll cnt = 0;
    while (true) {
        Answer ans;

        break;
        ++cnt;
    }

    cerr << "try num: " << cnt << endl;
    cerr << "best score: " << best_score << endl;

    ans.print_contests();

    return 0;
}


Measured memory_bytes: 3796