object Main extends App {
  val scanner = new java.util.Scanner(System.in)
  scanner.useDelimiter("")

  val input = Iterator.continually{
    scanner.next().head
  }.filter(_ != ' ').takeWhile(_ != '.')

  val outputs = input.foldLeft(List.fill('z' - 'a' + 1)(0)) { (list, c) =>
    val lower = c.toLower
    val index = lower - 'a'

    println(lower)

    list.updated(index, list(index) + 1)
  }.zipWithIndex

  outputs.foreach { t =>
    println(s"${('a' + t._2).toChar} : ${t._1}")
  }
}