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 -> [Int] -> String
slv n x = unlines $ map show $ map fst $ sortOn snd $ map (conv (fst vs, fst v) (n `div` 2) . snd ) tupleList
  where tupleList = sortOn fst $ zip x [1..]
        (_ , v:vs:vss) = splitAt ((n `div` 2) - 1) tupleList

conv :: (Int, Int) -> Int -> Int -> (Int, Int)
conv (a, b) v1 v2 | v1 < v2 = (a, v2)
                  | otherwise = (b, v2)