using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class AtCoderA
{
    static void Main()
    {
        var sc = new Scanner();

        long d = sc.NextLong();
        long[] c = sc.LongArray();
        long[,] s = new long[d, 26];
        for (int i = 0; i < d; i++)
        {
            for (int j = 0; j < 26; j++)
            {
                s[i, j] = sc.NextLong();
            }
        }

        long[] last = new long[26];

        for (int i = 0; i < d; i++)
        {
            long maxDiff = long.MinValue;
            long answerIndex = 0;
            long secondDiff = long.MinValue;
            long secondIndex = 0;
            long nextMaxScore = 0;
            long nnMaxScore = 0;
            long nnnMaxScore = 0;
            for (int j = 0; j < 26; j++)
            {
                long diff = 0;
                diff += s[i, j];
                diff += c[j] * (i + 1 - last[j]);
                if (diff > maxDiff)
                {
                    secondDiff = maxDiff;
                    maxDiff = diff;
                    secondIndex = answerIndex;
                    answerIndex = j;
                }
                if (i != d - 1 && s[i + 1, j] > nextMaxScore)
                {
                    nextMaxScore = s[i + 1, j];
                }
                if (i < d - 2 && s[i + 2, j] > nnMaxScore)
                {
                    nnMaxScore = s[i + 2, j];
                }
                if (i < d - 3 && s[i + 3, j] > nnnMaxScore)
                {
                    nnnMaxScore = s[i + 3, j];
                }
            }
            if ((i != d - 1) && (s[i + 1, answerIndex] > s[i, answerIndex] + 200) && (s[i + 1, answerIndex] == nextMaxScore))
            {
                answerIndex = secondIndex;
            }
            if (maxDiff < secondDiff + 1000)
            {
                if ((i < d - 2) && (s[i + 2, answerIndex] > s[i, answerIndex] + 200) && (s[i + 2, answerIndex] == nnMaxScore))
                {
                    answerIndex = secondIndex;
                }
                if ((i < d - 3) && (s[i + 3, answerIndex] > s[i, answerIndex] + 200) && (s[i + 3, answerIndex] == nnnMaxScore))
                {
                    answerIndex = secondIndex;
                }
            }
            last[answerIndex] = i;
            Console.WriteLine(answerIndex + 1);
        }
    }

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            while (_index >= _line.Length)
            {
                _line = Console.ReadLine().Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            _line = Console.ReadLine().Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}


Measured memory_bytes: 28848