import Data.List

main = do
  n <- readLn
  xs <- fmap (map read . words) getLine
  mapM_ print (solve n xs)


solve :: Int -> [Int] -> [Int]
solve n xs =
  [m | x <- xs, let m = if x <= m1 then m2 else m1]
  where
    ys = sort xs
    m1 = ys!!(n`div`2-1)
    m2 = ys!!(n`div`2)