using System;
using System.Linq;
using System.Numerics;
using System.Collections;
using System.Collections.Generic;
public class Program {
    static void Main (string[] args) {
        var n = int.Parse(Console.ReadLine());
        var s = Console.ReadLine().Split();
        var l = new List<int>();
        var t = new List<int>();
        foreach (var i in s) { l.Add(int.Parse(i)); }
        foreach (var i in l) { t.Add(i); }
        t.Sort();
        var x = (int)((n+1) / 2) - 1;
        for (int i = 0; i < n; ++i) {
            if (l[i] <= t[x]) {
                Console.WriteLine(t[x+1]);
            } else {
                Console.WriteLine(t[x]);
            }
        }
    }
}