-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = getContents >>= putStrLn . unlines . map show . solve . map read . tail . lines solve :: [Int] -> [Int] solve (x:xs) = scanl rank 1 xs where rank r y = if y > x then r + 1 else r