import Control.Applicative ((<$>), (<*>))
import Control.Monad
import Data.List

main :: IO ()
main = do
  n <- getl toInt
  unless (n == 0) $ do
    solve <$> replicateM n (getl toInt) >>= print
    main

solve :: [Int] -> Age
solve = foldl f (Age 0 0 0 0 0 0 0)
  where
    f a x
      | x < 10 = a {c0 = 1 + c0 a}
      | x < 20 = a {c10 = 1 + c10 a}
      | x < 30 = a {c20 = 1 + c20 a}
      | x < 40 = a {c30 = 1 + c30 a}
      | x < 50 = a {c40 = 1 + c40 a}
      | x < 60 = a {c50 = 1 + c50 a}
      | otherwise = a {c60 = 1 + c60 a}

toInt :: String -> Int
toInt s = read s

getl :: (String -> a) -> IO a
getl f = f <$> getLine

data Age = Age {c0 :: Int, c10 :: Int, c20 :: Int, c30 :: Int, c40 :: Int, c50 :: Int, c60 :: Int}

instance Show Age where
  show (Age x0 x10 x20 x30 x40 x50 x60) = show x0 ++ "\n" ++
                                          show x10 ++ "\n" ++
                                          show x20 ++ "\n" ++
                                          show x30 ++ "\n" ++
                                          show x40 ++ "\n" ++
                                          show x50 ++ "\n" ++
                                          show x60