import Data.List

main :: IO ()
main = do
    n <- readLn
    xs <- map read . words <$> getLine
    mapM_ print (solve n xs)

solve :: Int -> [Int] -> [Int]
solve n xs = map fst (sortBy (\x y -> compare (snd x) (snd y)) $ zip a sorter) where
    sortedxs = sortBy (\x y -> compare (fst x) (fst y)) $ zip xs [0..n-1]
    sorter = map snd sortedxs
    divn2 = div n 2
    a = (replicate (divn2) $ fst $ sortedxs !! (divn2)) ++ (replicate (divn2) $ fst $ sortedxs !! (divn2 - 1))