Problem:
Counting Characters

Write a program which counts and reports the number of each alphabetical letter. Ignore the case of characters.

Input

A sentence in English is given in several lines.

Output

Prints the number of alphabetical letters in the following format:

a : The number of 'a'
b : The number of 'b'
c : The number of 'c'
.
.
z : The number of 'z'

Constraints

The number of characters in the sentence < 1200

Sample Input

This is a pen.

Sample Output

a : 1
b : 0
c : 0
d : 0
e : 1
f : 0
g : 0
h : 1
i : 2
j : 0
k : 0
l : 0
m : 0
n : 1
o : 0
p : 1
q : 0
r : 0
s : 2
t : 1
u : 0
v : 0
w : 0
x : 0
y : 0
z : 0

Solution in C (judge verdict: Time Limit Exceeded)

#include <stdio.h>
int main(void){

char a,b;
char ch[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
int num[27]={};
char c;

for(b=1;b<1200;b++){
c=getchar( );

if(c=='a'||c=='A'){
num[1]+=1;
}
if(c=='b'||c=='B'){
num[2]+=1;
}
if(c=='c'||c=='C'){
num[3]+=1;
}
if(c=='d'||c=='D'){
num[4]+=1;
}
if(c=='e'||c=='E'){
num[5]+=1;
}
if(c=='f'||c=='F'){
num[6]+=1;
}
if(c=='g'||c=='G'){
num[7]+=1;
}
if(c=='h'||c=='H'){
num[8]+=1;
}
if(c=='i'||c=='I'){
num[9]+=1;
}
if(c=='j'||c=='J'){
num[10]+=1;
}
if(c=='k'||c=='K'){
num[11]+=1;
}
if(c=='l'||c=='L'){
num[12]+=1;
}
if(c=='m'||c=='M'){
num[13]+=1;
}
if(c=='n'||c=='N'){
num[14]+=1;
}
if(c=='o'||c=='O'){
num[15]+=1;
}
if(c=='p'||c=='P'){
num[16]+=1;
}
if(c=='q'||c=='Q'){
num[17]+=1;
}
if(c=='r'||c=='R'){
num[18]+=1;
}
if(c=='s'||c=='S'){
num[19]+=1;
}
if(c=='t'||c=='T'){
num[20]+=1;
}
if(c=='u'||c=='U'){
num[21]+=1;
}
if(c=='v'||c=='V'){
num[22]+=1;
}
if(c=='w'||c=='W'){
num[23]+=1;
}
if(c=='x'||c=='X'){
num[24]+=1;
}
if(c=='y'||c=='Y'){
num[25]+=1;
}
if(c=='z'||c=='Z'){
num[26]+=1;
}
/*if(c==''){
break;
}*/
}

for(b=0;b<=25;b++){
printf("%c : %d\n",ch[b],num[b+1]);
}

return 0;
}