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 maxCost = 0;
            long maxCostIndex = 0;

            long maxScore = 0;
            long maxScoreIndex = 0;

            long costSum = 0;
            for (int j = 0; j < 26; j++)
            {
                var cost = c[j] * (i + 1 - last[j]);
                if (cost > maxCost)
                {
                    maxCost = cost;
                    maxCostIndex = j;
                }
                costSum += cost;

                var score = s[i, j];
                if (score > maxScore)
                {
                    maxScore = score;
                    maxScoreIndex = j;
                }
            }

            if (costSum > maxScore - s[i, maxCostIndex])
            {
                last[maxCostIndex] = i;
                Console.WriteLine(maxCostIndex + 1);
            }
            else
            {
                last[maxScoreIndex] = i;
                Console.WriteLine(maxScoreIndex + 1);
            }
        }

        //long[] sums = new long[26];
        //for (int i = 0; i < 26; i++)
        //{
        //    long sum = 0;
        //    for (int j = 0; j < d; j++)
        //    {
        //        sum += s[j, i];
        //    }
        //    sums[i] = sum;
        //}

        //long maxDay = 0;
        //long max = 0;
        //for (int i = 0; i < 26; i++)
        //{
        //    if (sums[i] > max)
        //    {
        //        max = sums[i];
        //        maxDay = i;
        //    }
        //}
    }

    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: 28840