{-# LANGUAGE FlexibleContexts, BangPatterns #-}

module Main where

import Data.Char
import Data.List
import Control.Monad
import Control.Monad.ST
import Data.Array.IO
import Data.Array.Unboxed
import Control.Applicative
import Text.Printf


readInt :: IO Int
readInt = read <$> (input `seq` input)
    where input = do
            !c <- getChar
            if isDigit c || c == '-'
                then (c :) <$> input
                else return []

prints :: Show a => [a] -> IO ()
prints as = putStrLn $ concat $ intersperse " " $ map show as

main = do
    backet <- newArray ('a', 'z') 0 :: IO (IOUArray Char Int)
    let f = do
            !c <- getChar
            if c == '\n'
                then return ()
                else do
                    when (isAlpha c) $ writeArray backet (toLower c) . (+1) =<< readArray backet (toLower c)
                    f
    f
    forM_ ['a'..'z'] $ \c ->
        (\f -> putStrLn (printf "%c : %d" c f)) =<< readArray backet c
