// Original C++ solution (slower):
#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++) {

        //cout << i << endl;

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

        //cout << "out[" << i << "] " << out[i] << " ";

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

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

        }

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

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

    }



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

    //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);

    ll q = 0;

    ll score_tmp = LLONG_MIN;

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

        q = 0;

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

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

            //cout << i << endl;

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

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

            }

            //cout << score << endl;

        }

        if(score-score_tmp < score-q) {

            score_tmp = q;

        }

    }

    return score-q;

}



/*

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;

    vector<int> ans;

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

        out = proc(i);

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



        }

    }

    */

    

    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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem: