// 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, int k) {

    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()+13), d);

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

        //cout << i << endl;

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

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

        }

        //cout << score << endl;

    }

    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;

    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, k);

                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.4762385978281174x):
#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 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);

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

        }

    }

    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;

    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;

}