using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;

public class MainClass
{
    public static void Main(string[] args)
    {
        var sw = new StreamWriter(Console.OpenStandardOutput(), Console.Out.Encoding);
        sw.AutoFlush = false;
        Console.SetOut(sw);

        if (args.Length > 0 && args[0] == "debug")
        {
            var inputs = new[] { @"
5
86 90 69 51 2 96 71 47 88 34 45 46 89 34 31 38 97 84 41 80 14 4 50 83 7 82
19771 12979 18912 10432 10544 12928 13403 3047 10527 9740 8100 92 2856 14730 1396 15905 6534 4650 11469 3628 8433 2994 10899 16396 18355 11424
6674 17707 13855 16407 12232 2886 11908 1705 5000 1537 10440 10711 4917 10770 17272 15364 19277 18094 3929 3705 7169 6159 18683 15410 9092 4570
6878 4239 19925 1799 375 9563 3445 5658 19857 11401 6997 6498 19933 3848 2426 2146 19745 16880 17773 18359 3921 14172 16730 11157 5439 256
8633 15862 15303 10749 18499 7792 10317 5901 9395 11433 3514 3959 5202 19850 19469 9790 5653 784 18500 10552 17975 16615 7852 197 8471 7452
19855 17918 7990 10572 4333 438 9140 9104 12622 4985 12319 4028 19922 12132 16259 17476 2976 547 19195 19830 16285 4806 4471 9457 2864 2192
				", @"

				", @"

				", @"

				", @"

                ", @"

				", @"

				", @"

				" };

            foreach (var str in inputs)
            {
                var text = str.TrimStart();
                if (text.Length == 0) continue;
                var reader = new System.IO.StringReader(text);
                Console.SetIn(reader);
                Main2(args);
                Console.WriteLine("----------------------------------");
            }
        }
        else
            Main2(args);

        Console.Out.Flush();
    }

    private static void Main2(string[] args)
    {
        var D = int.Parse(Console.ReadLine());
        var C = Console.ReadLine().Split().Select(int.Parse).ToList();
        var S = EnumerablePlus.Repeat(D, () =>
        {
            return Console.ReadLine().Split()
               .Select(int.Parse)
               .ToList();
        }).ToList();

        for (int i = 0; i < D; i++)
        {
            var (_, n) = S[i].Select((s, n) => (s, n: n + 1))
                .MaxBy(t => t.s);
            Console.WriteLine(n);
        }
    }

    #region "入力"

    private static string NextInput = "";

    private static int Int() => int.Parse(Str());
    private static long Long() => long.Parse(Str());
    private static float Float() => float.Parse(Str());
    private static double Double() => double.Parse(Str());
    private static string Str()
    {
        var s = NextInput;
        if (s == "") s = Console.ReadLine();

        var idx = s.IndexOf(' ');
        if (idx >= 0)
        {
            NextInput = s.Substring(idx + 1);
            return s.Substring(0, idx);
        }
        NextInput = "";
        return s;
    }

    #endregion

}

public static class EnumerablePlus
{
    ///<summary>出力文字列に変換。</summary>
    public static string MkString<T>(this IEnumerable<T> list, string sep = null)
    {
        if (sep == null) sep = " ";

        return list.Aggregate(
            new System.Text.StringBuilder(),
            (a, b) => ((a.Length > 0) ? a.Append(sep) : a).Append(b)
            ).ToString();
    }

    ///<summary>添字付きfor。</summary>
    public static void ForEachWithIdx<T>(this IEnumerable<T> list, Action<T, long> a)
    {
        long i = 0;
        foreach (var item in list)
        {
            a(item, i++);
        }
    }

    ///<summary>添字なしfor。</summary>
    public static void ForEach<T>(this IEnumerable<T> list, Action<T> a)
    {
        foreach (var item in list)
        {
            a(item);
        }
    }

    ///<summary>指定回数デリゲートを呼び出す。</summary>
    public static IEnumerable<T> Repeat<T>(long n, Func<T> f)
    {
        for (long i = 0; i < n; i++)
        {
            yield return f();
        }
    }

    ///<summary>条件付きMin。</summary>
    public static T MinBy<T, U>(this IEnumerable<T> xs, Func<T, U> key) where U : IComparable<U>
    {
        return xs.Aggregate((a, b) => key(a).CompareTo(key(b)) <= 0 ? a : b);
    }

    ///<summary>条件付きMax。</summary>
    public static T MaxBy<T, U>(this IEnumerable<T> xs, Func<T, U> key) where U : IComparable<U>
    {
        return xs.Aggregate((a, b) => key(a).CompareTo(key(b)) >= 0 ? a : b);
    }

    ///<summary>条件付きMax。複数の値を返す。</summary>
    public static List<T> MaxByList<T, U>(this IEnumerable<T> xs, Func<T, U> key) where U : IComparable<U>
    {
        return xs.Aggregate(
            new List<T>(),
            (list, b) =>
            {
                if (list.Count == 0) { list.Add(b); return list; }

                var aa = key(list[0]);
                var bb = key(b);

                if (aa.CompareTo(bb) < 0) list.Clear();

                if (aa.CompareTo(bb) <= 0) { list.Add(b); return list; }

                return list;
            });
    }

    ///<summary>複数の値を返す。</summary>
    public static List<T> MaxList<T>(this IEnumerable<T> xs) where T : IComparable<T>
    {
        return xs.MaxByList(o => o);
    }
}

public static class MathPlus
{
    ///<summary>n(>=0)をradix進数に変換する。桁の小さい順に返す。</summary>
    public static List<long> NRadix(long n, long radix)
    {
        if (n < 0) throw new ArgumentOutOfRangeException(nameof(n));
        if (radix < 2) throw new ArgumentOutOfRangeException(nameof(n));

        var res = new List<long>();
        if (n == 0L)
        {
            res.Add(0);
            return res;
        }

        while (n > 0L)
        {
            res.Add(n % radix);
            n /= radix;
        }

        return res;
    }

    ///<summary>べき乗。高速な実装である。</summary>
    public static long Power(long x, long n)
    {
        if (n == 0) return 1;
        if (n % 2 == 0) return Power(x * x, n / 2);
        return x * Power(x, n - 1);
    }

    ///<summary>約数。順番は不定。</summary>
    public static List<long> Divisor(long n)
    {
        var list = Prime(n).
            GroupBy(id => id).
            Select(pair => new { prime = pair.Key, power = pair.Count() }).
            ToList();

        var result = list.Aggregate(new List<long>(), (left, pair) =>
        {
            var list2 = Enumerable.
                Range(0, pair.power + 1).
                Aggregate(new List<long>(), (res, l) =>
                {
                    var next = res.Count > 0 ? res.Last() * pair.prime : 1L;
                    res.Add(next);
                    return res;
                });

            if (left.Count == 0) return list2.ToList();

            return list2.
                SelectMany(l => left.Select(m => l * m)).
                ToList();
        });

        return result;
    }

    ///<summary>順列の数。</summary>
    public static long Permutation(long n, long r)
        => Factorial(n, r);

    ///<summary>組合せの数。</summary>
    public static long Combination(long n, long r)
    {
        if (r == 0) return 1;

        return Factorial(n, r) / Factorial(r);
    }

    ///<summary>階乗。カウントも指定可能。</summary>
    public static long Factorial(long a, long count = long.MaxValue)
    {
        long res = 1;

        for (long i = 0; a > 0 && i < count; i++)
        {
            checked { res *= a; }
            --a;
        }

        return res;
    }

    ///<summary>素因数分解。昇順。</summary>
    public static List<long> Prime(long a)
    {
        var res = new List<long>();

        var a2 = Math.Ceiling(Math.Sqrt(a));
        for (long b = 2; b <= a2; ++b)
        {
            while (a % b == 0)
            {
                res.Add(b);
                a = a / b;
                a2 = Math.Ceiling(Math.Sqrt(a));
            }
        }

        if (a > 1) res.Add(a);
        return res;
    }

    ///<summary>最小公倍数。</summary>
    public static long Lcm(IEnumerable<long> list)
    {
        return list.Aggregate((a, b) => Lcm(a, b));
    }

    ///<summary>最小公倍数。</summary>
    public static long Lcm(long a, long b)
    {
        return checked(a * b) / Gcd(a, b);
    }

    ///<summary>最大公約数。</summary>
    public static long Gcd(IEnumerable<long> list)
    {
        return list.Aggregate((a, b) => Gcd(a, b));
    }

    ///<summary>最大公約数。</summary>
    public static long Gcd(long a, long b)
    {
        if (a < b)
            Gcd(b, a);

        while (b != 0)
        {
            var rem = a % b;
            a = b;
            b = rem;
        }

        return a;
    }

    ///<summary>整数の切り上げ。</summary>
    public static long Ceiling(long a, long b) => (a + (b - 1)) / b;

    ///<summary>区間内の合計。beginも１から？end含む。</summary>
    public static ulong Sum(ulong begin, ulong end)
    {
        var up = Sum(end);
        var low = Sum(begin - 1);
        return up - low;
    }

    ///<summary>1からの合計。</summary>
    public static ulong Sum(ulong end) => checked((end + 1) * end / 2);
}

public static class Util
{
    ///<summary>リスト内の値を移動する。</summary>
    public static void Move<T>(this IList<T> list, int from, int to)
    {
        var item = list[from];

        for (var idx = from; idx > to; --idx)
        {
            list[idx] = list[idx - 1];
        }

        list[to] = item;
    }

    ///<summary>最後の値か、デフォルト値を取得。</summary>
    public static T LastOrValue<T>(this IList<T> list, T value)
    {
        return list.Count > 0 ? list.Last() : value;
    }

    ///<summary>辞書をMultiSetとして使うときのAdd。</summary>
    public static void AddMulti<T>(this IDictionary<T, int> xs, T key)
    {
        if (xs.ContainsKey(key))
            xs[key]++;
        else
            xs.Add(key, 1);
    }

    ///<summary>値を交換する。</summary>
    public static void Swap(ref int x, ref int y)
    {
        int temp = x;
        x = y;
        y = temp;
    }

    public static void Assert(bool cond)
    {
        if (!cond) throw new Exception();
    }
}



Measured memory_bytes: 29224