import Control.Monad
import Text.Printf
import Control.Applicative
import Data.List as L

main :: IO()
main = do
  [n] <- map read . words <$> getLine
  x <- map read . words <$> getLine
  printf "%s\n" $ slv n x

slv :: Int -> [Integer] -> String
slv n x = unlines $ map (show . fst . snd) (sortOn (snd . fst) $ zip tupleList anslist)
  where tupleList = sortOn fst $ zip x [1..]
        (_ , v:vs:vss) = splitAt ((n `div` 2) - 1) tupleList
        anslist = replicate (n `div` 2) vs ++ replicate (n `div` 2) v