import Data.Char(toLower, ord)
import Text.Printf
import Data.List
import Data.Function
import qualified Data.Map as Map

main = interact $ show' . solve
  where
    show' = unlines . map fmt
    solve = addEmpty . count
    fmt (s, d) = printf "%s : %d" s d
    addEmpty xs = [tuple [c] |c <- ['a'..'z']]
      where
        tuple s = case m of
                    Just val -> (s, val)
                    Nothing -> (s, 0)
          where m = Map.lookup s map
        map = Map.fromList xs
    count cs = map length' . group . sort $ [toLower' c| c <- cs, isAlpha c]
    length' str = ([head str], length str)
    toLower' c | isUpper c = toLower c
               | otherwise = c
    isUpper c = a <= o && o <= z
      where o = ord c
    isAlpha c = a <= o && o <= z'
      where o = ord c
    a = ord 'A'
    z = ord 'Z'
    z' = ord 'z'

