import Data.List(sort,group)
import Control.Monad(forM_)

main = do
  ns <- fmap (fmap (read :: String -> Int) . words) . lines <$> getContents
  let ls = map length (group $ sort $ concat $ tail ns)
  forM_ ls (putStrLn . show)