/**
 *    author:  otera    
**/
#include<iostream>
#include<string> 
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm> 
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
#include<random>
#include<ctime>
using namespace std;

#define int long long
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const int inf=1e9+7;
const ll INF=1LL<<60 ;
const ll mod=1e9+7 ;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<int, int> P;
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
#define debug(x)  cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int d;
vector<int> c;
vector<vector<int>> s;

//状態
struct STATE {
    vector<int> x;
};

// 状態の初期化
void init (STATE& state) {
    state.x.resize(d);
    rep(i, d) {
        state.x[i] = rand() % 26;
    }
}

// 状態遷移
void modify (STATE& state) {
    rep(i, 6) {
        int j = rand() % d;
        state.x[j] = rand() % 26;
    }
}

// 状態のスコア計算
int calc_score (STATE& state) {
    vector<int> last(26, 0);
    int res = 0;
    rep(i, d) {
        last[state.x[i]] = i + 1;
        res += s[i][state.x[i]];
    }
    rep(j, 26) {
        res -= c[j] * (d - last[j]);
    }
    return res;
}

const double TIME_LIMIT = 1.90;

// 山登り法
void mountain() {
    STATE state;
    init(state);
    double start_time = clock(); // 開始時刻
    while (true) { // 時間の許す限り回す
        double now_time = clock(); // 現在時刻
        if ((now_time - start_time) / CLOCKS_PER_SEC > TIME_LIMIT) break;

        STATE new_state = state;
        modify(new_state);
        int new_score = calc_score(new_state);
        int pre_score = calc_score(state);

        if (new_score > pre_score) { // スコア最大化の場合
            state = new_state;
        }
    }
    //出力
    rep(i, d) {
        cout << state.x[i] + 1 << endl;
    }
}

// 焼きなまし法
void sa() {
    STATE state;
    init(state);
    double start_temp = 40000, end_temp = -40000; // 適当な値を入れる 
    double start_time = clock(); // 開始時刻
    while (true) { // 時間の許す限り回す
        double now_time = clock(); // 現在時刻
        if ((now_time - start_time) / CLOCKS_PER_SEC > TIME_LIMIT) break;

        STATE new_state = state;
        modify(new_state);
        int new_score = calc_score(new_state);
        int pre_score = calc_score(state);

        // 温度関数
        double temp = start_temp + (end_temp - start_temp) * (now_time-start_time) / TIME_LIMIT;
        // 遷移確率関数(最大化の場合)
        double prob = exp((new_score-pre_score)/temp);

        if (prob > (rand()%inf)/(double)inf) { // 確率probで遷移する
            state = new_state;
        }
    }
}

void solve() {
	cin >> d;
    c.resize(26);
    rep(i, 26) cin >> c[i];
    s.assign(d, vector<int>(26, 0));
    rep(i, d) {
        rep(j, 26) {
            cin >> s[i][j];
        }
    }
    mountain();
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(10);
	//int t; cin >> t; rep(i, t)solve();
	solve();
    return 0;
}

Measured memory_bytes: 3700