#include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
using Graph = vector<vector<int>>;
typedef pair<int,int> P;
typedef long long ll;

int main(){
    ll d; cin >> d;
    vector<P> p(26);
    rep(i,26){
        ll c; cin >> c;
        p[i].first = c;
        p[i].second = i;
    }

    sort(all(p)); reverse(all(p));
    vector<vector<ll>> g(d, vector<ll> (26));

    rep(i,d){
        rep(j,26){
            cin >> g[i][j];
        }
    }

    rep(i,7){
        cout << p[0].second + 1 << endl;
        cout << p[1].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[2].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[3].second + 1 << endl;
        cout << p[1].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[4].second + 1 << endl;
        cout << p[0].second + 1 << endl;

        cout << p[5].second + 1 << endl;
        cout << p[1].second + 1 << endl;
        cout << p[6].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[7].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[8].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[9].second + 1 << endl;
        cout << p[0].second + 1 << endl;

        cout << p[10].second + 1 << endl;
        cout << p[1].second + 1 << endl;
        cout << p[11].second + 1 << endl;
        cout << p[2].second + 1 << endl;
        cout << p[12].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[13].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[14].second + 1 << endl;
        cout << p[0].second + 1 << endl;

        cout << p[15].second + 1 << endl;
        cout << p[1].second + 1 << endl;
        cout << p[16].second + 1 << endl;
        cout << p[3].second + 1 << endl;
        cout << p[17].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[18].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[19].second + 1 << endl;
        cout << p[0].second + 1 << endl;

        cout << p[20].second + 1 << endl;
        cout << p[2].second + 1 << endl;
        cout << p[21].second + 1 << endl;
        cout << p[4].second + 1 << endl;
        cout << p[22].second + 1 << endl;
        cout << p[5].second + 1 << endl;
        cout << p[23].second + 1 << endl;
        cout << p[6].second + 1 << endl;
        cout << p[24].second + 1 << endl;
        cout << p[25].second + 1 << endl;                                              
    }

        cout << p[0].second + 1 << endl;
        cout << p[1].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[2].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[3].second + 1 << endl;
        cout << p[1].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[4].second + 1 << endl;
        cout << p[0].second + 1 << endl;

        cout << p[5].second + 1 << endl;
        cout << p[1].second + 1 << endl;
        cout << p[6].second + 1 << endl;
        cout << p[0].second + 1 << endl;
        cout << p[7].second + 1 << endl;

}

Measured memory_bytes: 3680