// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <vector>

#include <cmath>

#include <climits>

using namespace std;

#define ll long long



int d = 365;

int k = 0;



vector<vector<int>> s(d, vector<int>(26, 0));

vector<ll> c(26);



void init() {

    cin >> d;

    for(int i = 0; i < 26; i++) cin >> c[i];

    for(int i = 0; i < d; i++) {

        for(int j = 0; j < 26; j++) {

            cin >> s[i][j];

        }

    }

    return;

}



ll calc(vector<int> out) {

    ll score = 0;

    vector<ll> last(26, 0);

    for(int i = 0; i < out.size(); i++) {

        last[out[i]] = i+1; // タイプ番号

        for(int j = 0; j < 26; j++) {

            score -= c[j]*((i+1)-last[j]);

        }

        score += s[i][out[i]];

        //cout << "score : " << score << endl;

    }

    

    //cout << p << endl;

    //if(out.size() >= d) return score;

    //cout << k << endl;

    //cout << out.size() << " " << d << endl;

    //int p = min(int(out.size()+k), d);

    //int k = 13;

    //int p = min(int(out.size()+k), d);

    /*

    ll q = LLONG_MIN;

    for(int k = 0; k < 26; k++) {

        int p = min(int(out.size()+k), int(d));

        ll tmp = 0;

        for(int i = out.size(); i < p; i++) {

            for(int j = 0; j < 26; j++) {

                //score -= c[j]*((i)-last[j]);

                tmp -= c[j]*((i)-last[j]);

            }

        }

        if(tmp > q) {

            q = tmp;

        }

    }

    */



    //int k = 10;

    ll score_tmp = score;

    ll score_max = LLONG_MIN;

    for(int k = 0; k < 26; k++) { 

        score_tmp = score;

        int p = min(int(out.size()+k), int(d));

        for(int i = out.size(); i < p; i++) {

            for(int j = 0; j < 26; j++) {

                //score -= c[j]*((i)-last[j]);

                score_tmp -= c[j]*((i)-last[j]);

                //tmp -= c[j]*((i)-last[j]);

            }

        }

        if(score_tmp > score_max) {

            score_max = score_tmp;

        }

    }

    return score_max;

}



int main() {

    init();

    

    vector<int> out;

    ll ans = 0;

    ll max_v = -1;

    //for(int k = 0; k < 26; k++) {

        //cout << "k: " << k << endl;

        //vector<int> out;

    for(int i = 0; i < d; i++) {

        //max_v = -100000000000;

        max_v = LLONG_MIN;

        int best = 0;

        for(int j = 0; j < 26; j++) {

            out.push_back(j);

            //for(int k = 0; k < 26; k++) {

            ll tmp = calc(out);

            if(max_v < tmp) {

                max_v = tmp;

                best = j;

            }

            //}

            out.pop_back();

        }

        out.push_back(best);

    }

    //}

    

    for(int i = 0; i < d; i++) {

        cout << out[i]+1 << endl;

    }

    //cout << max_v << endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.2302904487131006x):
#include <iostream>

#include <algorithm>

#include <vector>

#include <cmath>

#include <climits>

using namespace std;

#define ll long long



int d = 365;

int k = 0;



vector<vector<int>> s(d, vector<int>(26, 0));

vector<ll> c(26);



void init() {

    cin >> d;

    for(int i = 0; i < 26; i++) cin >> c[i];

    for(int i = 0; i < d; i++) {

        for(int j = 0; j < 26; j++) {

            cin >> s[i][j];

        }

    }

    return;

}



ll calc(vector<int> out) {

    ll score = 0;

    vector<ll> last(26, 0);

    for(int i = 0; i < out.size(); i++) {

        last[out[i]] = i+1; // タイプ番号

        for(int j = 0; j < 26; j++) {

            score -= c[j]*((i+1)-last[j]);

        }

        score += s[i][out[i]];

        //cout << "score : " << score << endl;

    }

    



    //int k = 10;

    k = 3;

    int p = min(int(out.size()+k), int(d));

    for(int i = out.size(); i < p; i++) {

        for(int j = 0; j < 26; j++) {

            score -= c[j]*((i+1)-last[j]);

            //tmp -= c[j]*((i)-last[j]);

        }

    }

    return score;

}



/*

vector<int> proc(int k) {

    vector<int> out;

    ll ans = 0;

    //ll tmp = 0;

    ll max_v = -1;

    //for(int k = 0; k < 26; k++) {

    //cout << "k: " << k << endl;

    //vector<int> out;

    for(int i = 0; i < d; i++) {

        //max_v = -100000000000;

        max_v = LLONG_MIN;

        int best = 0;

        for(int j = 0; j < 26; j++) {

            out.push_back(j);

            ll tmp = calc(out);

            if(max_v < tmp) {

                max_v = tmp;

                best = j;

            }

            out.pop_back();

        }

        out.push_back(best);

    }

    //}

    return out;

}

*/



int main() {

    init();

    

    vector<int> out;

    ll ans = 0;

    ll max_v = -1;

    //for(int k = 0; k < 26; k++) {

        //cout << "k: " << k << endl;

        //vector<int> out;

    for(int i = 0; i < d; i++) {

        //max_v = -100000000000;

        max_v = LLONG_MIN;

        int best = 0;

        for(int j = 0; j < 26; j++) {

            out.push_back(j);

            //for(int k = 0; k < 26; k++) {

            ll tmp = calc(out);

            if(max_v < tmp) {

                max_v = tmp;

                best = j;

            }

            //}

            out.pop_back();

        }

        out.push_back(best);

    }

    //}

    

    for(int i = 0; i < d; i++) {

        cout << out[i]+1 << endl;

    }

    //cout << max_v << endl;

    return 0;

}