#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(i64 (i) = (s);(i) < (e);(i)++)
#define all(x) x.begin(),x.end()
#define STRINGIFY(n) #n
#define TOSTRING(n) STRINGIFY(n)
#define PREFIX "#" TOSTRING(__LINE__) "| "
#define debug(x) \
{ \
  std::cout << PREFIX << #x << " = " << x << std::endl; \
}

std::ostream& output_indent(std::ostream& os, int ind) {
  for(int i = 0; i < ind; i++) os << " ";
  return os;
}

template<class S, class T> std::ostream& operator<<(std::ostream& os, const std::pair<S, T>& p);
template<class T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& v);

template<class S, class T> std::ostream& operator<<(std::ostream& os, const std::pair<S, T>& p) {
  return (os << "(" << p.first << ", " << p.second << ")");
}
template<class T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) {
  os << "[";
  for(int i = 0;i < v.size();i++) os << v[i] << ", ";
  return (os << "]");
}

template<class T>
static inline std::vector<T> ndvec(size_t&& n, T val) { return std::vector<T>(n, std::forward<T>(val)); }
template<class... Tail>
static inline auto ndvec(size_t&& n, Tail&&... tail) {
  return std::vector<decltype(ndvec(std::forward<Tail>(tail)...))>(n, ndvec(std::forward<Tail>(tail)...));
}
template<class Cond> struct chain {
  Cond cond; chain(Cond cond) : cond(cond) {}
  template<class T> bool operator()(T& a, const T& b) const { if(cond(a, b)) { a = b; return true; } return false; }
};
template<class Cond> chain<Cond> make_chain(Cond cond) { return chain<Cond>(cond); }

std::mt19937 mt(188888888);
 
struct Timer {
  chrono::high_resolution_clock::time_point st;
  Timer() { st = now(); }
  chrono::high_resolution_clock::time_point now() { return chrono::high_resolution_clock::now(); }
  chrono::milliseconds::rep span() {
    auto ed = now();
    return chrono::duration_cast<chrono::milliseconds>(ed - st).count();
  }
};

const i64 M = 26;
i64 D;
vector<i64> C;
vector<vector<i64>> S;

i64 gen_rand(i64 N) {
  return mt() % N;
}

vector<i64> solve() {

  vector<i64> best(D, 0);
  i64 best_score = -1e17;

  Timer timer;

  vector<i64> Sigma(M);
  vector<i64> ans(D);
  i64 ans_score = 0;
  rep(i,0,D) {
    ans[i] = gen_rand(M);
  }

  auto calc_score = [](i64 k, const vector<i64>& t) {
    i64 last = -1;
    i64 res = 0;
    rep(i,0,D) {
      if(t[i] == k) {
        last = i;
        res += S[i][k];
      }
      res -= C[k] * (i - last);
    }
    return res;
  };

  rep(i,0,M) {
    Sigma[i] = calc_score(i, ans);
    ans_score += Sigma[i];
  }
  i64 q = 0;
  const i64 init_cnt = 2000;
 
  i64 else_cnt = init_cnt;
  i64 noupdate_cnt = 0;
  for(q = 0; timer.span() < 1900; q++) {
    if(else_cnt >= init_cnt) {
      else_cnt = 0;
      if(ans_score > best_score) {
        best = ans;
        best_score = ans_score;
      }
      /* ans_score = 0;
      const i64 CHANGE = 3;
      rep(i,0,CHANGE) {
        i64 d = gen_rand(D);
        i64 m = gen_rand(M);
      }
      rep(k,0,M) {
        Sigma[k] = calc_score(k, ans);
        ans_score += Sigma[k];
      } */
      else {
        const i64 CHANGE = gen_rand(5) + 2;
        rep(i,0,CHANGE) {
          i64 d = gen_rand(D);
          i64 m = gen_rand(M);
          i64 b = ans[d];
          ans[d] = m;
          ans_score -= Sigma[m];
          ans_score -= Sigma[b];
          Sigma[m] = calc_score(m, ans);
          Sigma[b] = calc_score(b, ans);
          ans_score += Sigma[m];
          ans_score += Sigma[b];
        }
      }
    }
    i64 d = gen_rand(D);
    i64 m = gen_rand(M);
    i64 b = ans[d];
    i64 res_score = ans_score;
    res_score -= Sigma[m];
    res_score -= Sigma[b];
    ans[d] = m;
    i64 m_score = calc_score(m, ans);
    i64 b_score = calc_score(b, ans);
    ans[d] = b;
    res_score += m_score;
    res_score += b_score;
    if(res_score > ans_score) {
      ans[d] = m;
      std::swap(res_score, ans_score);
      Sigma[m] = m_score;
      Sigma[b] = b_score;
    }
    else {
      else_cnt++;
    }
  }
  if(ans_score > best_score) {
    std::swap(best, ans);
    std::swap(best_score, ans_score);
  }
  cerr << best_score << endl;
  cerr << q << endl;
  cerr << noupdate_cnt << endl;
  return best;
}

int main() {
  cin >> D;
  C.resize(M);
  rep(i,0,M) {
    cin >> C[i];
  }
  S.resize(D);
  rep(i,0,D) {
    S[i].resize(M);
    rep(j,0,M) {
      cin >> S[i][j];
    }
  }

  vector<i64> ans = solve();
  rep(i,0,D) {
    cout << ans[i] + 1 << endl;
  }
}



Measured memory_bytes: 3720