let rec loop array =
  let line,eof = try read_line (), false with End_of_file -> "", true in
  if eof then
    begin
      Array.iteri (fun i n -> Printf.printf "%c : %d\n" (Char.chr (i + (Char.code 'a'))) n) array;
      flush stdout;
    end
  else
    begin
      let input = String.lowercase line in
      String.iter (fun char ->
          let index = (Char.code char) - (Char.code 'a') in
          if 0 <= index && index < 26 then
            begin
              let n = Array.get array index in
              Array.set array index (n+1)
            end
          else ()
        ) input;
      loop array
    end
;;

let () =
      let array = Array.make 26 0 in
      loop array;;
