let d = stdin.ReadLine() |> int
let c = stdin.ReadLine().Split() |> Array.map int
let s = [|1..d|] |> Array.map (fun _ -> stdin.ReadLine().Split() |> Array.map int)

let rec f i (lastli:int[]) vli =
    if i = d then vli
    else
        let diffli = Array.zip c s.[i] |> Array.mapi (fun id (x,y) -> y - x * (id+1 - lastli.[id]))
        let max = diffli |> Array.max
        let maxi = diffli |> Array.findIndex (fun x -> x = max)
        Array.set lastli maxi (i+1)
        Array.append vli [|maxi+1|] |> f (i+1) lastli

f 0 ([|1..26|] |> Array.map (fun _ -> 0)) [||]
|> Array.map stdout.WriteLine
|> ignore