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

namespace debug
{
    class main
    {
        static void Main(string[] args)
        {
            //問題クラスを展開
            ProgramA a = new ProgramA();
            a.main();//実行する

        }

    }

    class ProgramA
    {
        public void main()
        {
            //入力
            int D = int.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Split(' ');
            int n = 26;

            long[] c = new long[n];
            long[] count = new long[n];

            for (int i = 0; i < n; i++)
                c[i] = long.Parse(s[i]);

            long[,] score = new long[n, D];

            for (int i = 0; i < D; i++)
            {
                string[] t = Console.ReadLine().Split(' ');
                for (int j = 0; j < n; j++)
                    score[j, i] = long.Parse(t[j]);
            }

            for (int i = 0; i < D; i++)
            {
                int max = 0;
                long max_s = score[0,i];
                for (int j = 1; j < n; j++)
                {
                    if (max_s < score[j,i])
                    {
                        max = j;
                        max_s = score[j,i];
                    }
                }

                Console.WriteLine(max + 1);
            }

        }
    }
    //ABC170
    class ProgramB
    {
        public void main()
        {
            //入力
            int D = int.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Split(' ');
            int n = 26;

            long[] c = new long[n];
            long[] count = new long[n];

            long[,] score = new long[n,D];

            for (int i = 0; i < D; i++)
            {
                string[] t = Console.ReadLine().Split(' ');
                for (int j = 0; j < n; j++)
                    score[j, i] = long.Parse(t[j]);
            }

            for (int i = 0; i < n; i++)
                c[i] = long.Parse(s[i]);

            long ans = 0;
            
            for (int i = 0;i < D;i++)
            {
                int v = int.Parse(Console.ReadLine());

                count[v-1] = i+1;
                long sum = score[v - 1, i];
                for(int j = 0;j < n;j++)
                {
                    if(j != v -1)
                        sum -= c[j] * (i + 1 - count[j]);
                }
                ans += sum;

                Console.WriteLine(ans);
            }

        }
    }

    

    class ProgramC
    {
        public void main()
        {
            //入力
            int D = int.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Split(' ');
            int n = 26;

            long[] c = new long[n];
            long[] count = new long[n];

            long[,] score = new long[n, D];

            for (int i = 0; i < D; i++)
            {
                string[] t = Console.ReadLine().Split(' ');
                for (int j = 0; j < n; j++)
                    score[j, i] = long.Parse(t[j]);
            }

            for (int i = 0; i < n; i++)
                c[i] = long.Parse(s[i]);

            long[] ans = new long[D];

            for (int i = 0; i < D; i++)
            {
                int v = int.Parse(Console.ReadLine());

                count[v - 1] = i + 1;
                long sum = score[v - 1, i];
                for (int j = 0; j < n; j++)
                {
                    if (j != v - 1)
                        sum -= c[j] * (i + 1 - count[j]);
                }

                if (i == 0)
                    ans[i] = sum;
                else
                    ans[i] = ans[i -1] + sum;
            }

            //クエリのかず
            int m = int.Parse(Console.ReadLine());

            for (int i = 0; i < m; i++)
            {
                string[] q = Console.ReadLine().Split(' ');

            }


        }
    }

    

}






Measured memory_bytes: 28108