Imports System
Imports System.Collections.Generic
class p
    shared sub main()
        dim n = Integer.Parse(Console.ReadLine())
        dim s = Console.ReadLine().Split()
        dim L = new List(of Integer)
        for each i as string In s : L.Add(Integer.Parse(i)) : next
        dim x = CInt((n+1) / 2 - 0.1) - 1
        for i as Integer = 0 to n-1
            dim t = new List(of Integer)
            for j as Integer = 0 to n-1
                if j <> i : t.Add(L(j)) : end if
            next j
            t.sort()
            Console.WriteLine(t(x))
        next i
    end sub
end class