import Data.List.Split

removeAt :: Int -> [Int] -> [Int]
removeAt n list = a ++ (tail b)
	where
		split = splitAt n list
		(a, b) = split
		
oddMedian :: [Int] -> Int
oddMedian list = ordList !! count
	where
		ordList = sort list :: [Int]
		len = length ordList
		count = (len - 1) `quot` 2
		
showAllMedians :: Int -> [Int] -> IO ()
showAllMedians n list = do
	if n < length list
		then
			do
				let list' = removeAt n list
				putStrLn $ show $ oddMedian list'
				showAllMedians (n+1) list
		else
			return ()

main = do
	a <- getLine
	b <- getLine
	let b' = map (read :: String -> Int) (splitOn " " b)
	showAllMedians 0 b'
	