console.log((args=>{
  const [[D],c,...s] = args.trim().split('\n').map(r=>r.split(' ').map(v=>v|0));
  const his = [];
  const last = Array(26).fill(0);
  for ( let i = 0; i < D; i++ ) {
    let max = 0, task = 0;
    for ( let j = 0; j < 26; j++ ) {
      let score = s[i][j] + (i-last[j]) * c[j];
      if ( score > max ) {
        task = j;
        max = score;
      }
    }
    his.push(task+1);
    last[task] = i;
  }
  return his.join`\n`;
})(require('fs').readFileSync('/dev/stdin', 'utf8')));
