first_f :: Double -> Bool
first_f = (>) 165

last_f :: Double -> Bool
last_f = (<) 185

func :: Double -> Double -> Bool
func i d = (i <= d) && (d < i + 5)

toS :: (Double -> Bool) -> [Double] -> String
toS _ [] = ""
toS f (d:dr)
  |f d = '*':(toS f dr)
  |otherwise = toS f dr

functions :: [(String, (Double -> Bool))]
functions = [("1:", first_f), ("2:", func 165), ("3:", func 170), ("4:", func 175), ("5:", func 180), ("6:", last_f)]

solve :: [(String, Double -> Bool)] -> [Double] -> [String]
solve [] _ = []
solve ((s, f):fr) l = (s ++ (toS f l)) : (solve fr l)



main :: IO()
main = do
  (n:arg) <- fmap lines getContents
  mapM_ putStrLn (solve functions (map (\n -> read n :: Double) arg))