import Control.Monad

main = do
  n <- read <$> getLine
  a <- map read . words <$> getLine
  forM_ (solve n a) $ \t ->
    putStrLn . show $ t

solve :: Int -> [Int] -> Int
solve n a = 
  let med = a !! (n `div` 2)
      medPrev = a !! ((n `div` 2) - 1)
      medNext = a !! ((n `div` 2) + 1)
  in map (\x -> if x < n `div` 2 then medPrev else if x == n `div` 2 then med else medNext) [1..n]
  
      