import Control.Monad

main :: IO ()
main = do
  n <- readLn
  ls <- replicateM n getLine
  let ans = counting' ls
  mapM_ putStrLn ans

counting :: [String] -> [String] -> [String]
counting [] ss = ss
counting (s:rs) [a,b,c,d,e,f]
  | s < "165.0" = counting rs [(a++"*"),b,c,d,e,f]
  | s < "170.0" = counting rs [a,(b++"*"),c,d,e,f]
  | s < "175.0" = counting rs [a,b,(c++"*"),d,e,f]
  | s < "180.0" = counting rs [a,b,c,(d++"*"),e,f]
  | s < "185.0" = counting rs [a,b,c,d,(e++"*"),f]
  | otherwise   = counting rs [a,b,c,d,e,(f++"*")]

counting' :: [String] -> [String]
counting' ss = counting ss ["1:","2:","3:","4:","5:","6:"]