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 (Python):
from sys import stdin
freq = {}
for line in stdin:
    string = line.lower()

    for i in string:
        if i.isalpha():
            freq[i] = freq.get(i, 0) + 1

for char in range(ord('a'), ord('z')+1):
    char = chr(char)
    print('%s : %d' % (char, freq.get(char, 0)))

Solution (Python):
import sys
 
alp = "abcdefghijklmnopqrstuvwxyz"
s = []
for line in sys.stdin:
    s += line.lower()
for i in alp:
    print(i + " : " +str(s.count(i)))

Solution (Python):
import sys

cc = ['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']
c  = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

while True:
  s = sys.stdin.readline().rstrip('\r\n')
  if s == '':
    break

  for ii in range(len(s)):
    test = s[ii].lower()
    for jj in range(len(cc)):
      if test == cc[jj]:
        c[jj] += 1

for ii in range(len(cc)):
  print(cc[ii] +  ' : ' + str(c[ii]))

Solution (Python):



import sys
import string

alphabet = string.ascii_lowercase
char_count = dict()
for c in alphabet:
    char_count[c] = 0

for s in sys.stdin:
    s = s.strip().lower()
    for c in s:
        if c in alphabet:
            char_count[c] += 1

for c in alphabet:
    print(c, ':', char_count[c])

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):print(chr(i),':',s.count(chr(i)))

Solution (Python):
alist = list('abcdefghijklmnopqrstuvwxyz')
r = {}
for al in alist:
    r[al] = 0

line = ""
while True:
    try:
        line += input().lower()
    except:
        break

for i in range(len(line)):
    if line[i] in r.keys():
        r[line[i]] += 1

for k,v in r.items():
    print("{} : {}".format(k, v))

Solution (Python):
import sys

alist = list('abcdefghijklmnopqrstuvwxyz')
r = {}
for al in alist:
    r[al] = 0

line = sys.stdin.read().lower()

for i in range(len(line)):
    if line[i] in r.keys():
        r[line[i]] += 1

for k,v in r.items():
    print("{} : {}".format(k, v))

Solution (Python):
import sys
cs = { c : 0 for c in list("abcdefghijklmnopqrstuvwxyz")}
for c in list(sys.stdin.read()):
    c = c.lower()
    if c in cs.keys():
        cs[c] = cs[c] + 1
for (c,cnt) in sorted(list(cs.items())):
    print('{0} : {1}'.format(c,cnt))

Solution (Python):
import sys
lines = sys.stdin.readlines()
cnt = [0 for i in range(26)]
for line in lines:
    line = line.lower()
    alph = [chr(ord('a') + i) for i in range(26)]
    for idx, i in enumerate(alph):
        for k in line:
            if i == k:
                cnt[idx] += 1
for idx, i in enumerate(alph):
    print("{0} : {1}".format(i, cnt[idx]))

Solution (Python):
import sys
lines = sys.stdin.readlines()
cnt = [0 for i in range(26)]
alph = [chr(ord('a') + i) for i in range(26)]
for line in lines:
    line = line.lower()
    for idx, i in enumerate(alph):
        for k in line:
            if i == k:
                cnt[idx] += 1
for idx, i in enumerate(alph):
    print("{0} : {1}".format(i, cnt[idx]))

Solution (Python):
import sys
letters = 'abcdefghijklmnopqrstuvwxyz'
s = sys.stdin.read().lower()
for i in range(26) :
    print(letters[i] + ' : %d' % s.count(letters[i]))

Solution (Python):
import sys

inLine = []
strings = []
for line in sys.stdin:
    for i in range(len(list(str(line).lower()))):
        strings.append(list(str(line).lower())[i])
arr = []
for i in range(26):
    arr.append(0)

for i in range(len(strings)):
    if ord(strings[i]) >= 97 and ord(strings[i]) <= 122:
        arr[ord(strings[i]) - 97] += 1

for i in range(97,123):
    print(chr(i) + " : "  + str(arr[i - 97]))

Solution (Python):
import string
from collections import Counter


def count(s):
    """Count the occurence of each alphabet chars.
    The count is done case insensitively.

    >>> count('A:a b')  
    Counter({'a': 2, 'b': 1})
    """
    return Counter([c for c in s.lower() if c.isalpha()])


def run():
    s = ''
    while True:
        try:
            s += input()
        except EOFError:
            break

    c = count(s)
    for a in string.ascii_lowercase:
        print(a, ':', c[a])


if __name__ == '__main__':
    run()

Solution (Python):
import sys
alphabet = "abcdefghijklmnopqrstuvwxyz"
sentence = sys.stdin.read()

for letter in alphabet:
    print(letter, ":", sentence.lower().count(letter))

Solution (Python):

import sys
c = [0 for i in range(26)]
in_list = []

for line in sys.stdin:
    in_list.append(line)

for s in in_list:
    for i in range(len(s)):
        if   ord(s[i]) >= ord('a') and ord(s[i]) <= ord('z'):
            c[ord(s[i])-97] += 1
        elif ord(s[i]) >= ord('A') and ord(s[i]) <= ord('Z'):
            c[ord(s[i])-65] += 1

for i in range(26):
    print(chr(ord('a')+i) + " : " + str(c[i]))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):print(chr(i),':',s.count(chr(i)))

Solution (Python):
import sys, string
 
lines = []
for line in sys.stdin:
    lines.append(line)
 
text = ''.join(lines).lower()
     
for char in string.ascii_lowercase:
    print("{} : {}".format(char, text.count(char)))

Solution (Python):
import string as st
string=[]
try:
    while True:
        s = input()
        string =list(string)
        if not s :
            break
        string.extend(s)
        string=map(str,string)
        string="".join(string).lower()
except EOFError:
    for i in range(len(st.ascii_lowercase)):
        print("{} : {}".format(st.ascii_lowercase[i],string.count(st.ascii_lowercase[i])))

Solution (Python):
import string as st
string=[]
try:
    while True:
        s = input()
        string =list(string)
        if not s :
            break
        string.extend(s)
        string=map(str,string)
        string="".join(string).lower()
except EOFError:
    for i in range(len(st.ascii_lowercase)):
        print("{} : {}".format(st.ascii_lowercase[i],string.count(st.ascii_lowercase[i])))

Solution (Python):
from collections import OrderedDict as od
 
  
dic = od()
for s in "abcdefghijklmnopqrstuvwxyz":
    dic[s] = 0
 
x = ""
while True:  
    try:  
        x += input().lower()
    except EOFError:
        break
 
for key,value in dic.items():
    value = x.count(key)
    print(key, ":", value)

Solution (Python):
cnt = [0 for i in range(26)]
while True:
      try:
            s = input()
      except:
            break
      for i in range(len(s)):
            m = ord(s[i])-ord('A')
            if(m >= 0 and m < 26):
                  cnt[m]+=1
            m = ord(s[i])-ord('a')
            if(m >= 0 and m < 26):
                  cnt[m]+=1
for i in range(26):
      print(chr(i+ord('a')),":",cnt[i])

Solution (Python):


import sys

word = sys.stdin.read().lower()
for i in range(ord('a'), ord('z') + 1):
    print('{0} : {1}'.format(chr(i), word.count(chr(i))))

Solution (Python):
import sys
def lower(word):
    Word = ''
    str = list(word)
    for i in range(len(str)):
        if str[i].isupper(): Word += str[i].lower()
        else: Word += str[i]
    return Word
a = []
for line in sys.stdin:
    a.extend(list(line))


count = [0] * 26
for i in range(len(a)):
    a[i] = lower(a[i])
    if 97 <= ord(a[i]) and ord(a[i]) < 123:
        count[ord(a[i]) - 97] += 1
for i in range(26):
    print(chr(i + 97) + ' : ' + str(count[i]))

Solution (Python):



import sys

sents = [line.strip() for line in sys.stdin.readlines()]
dic = {chr(x):0 for x in range(ord('a'), ord('z')+1)}

for sent in sents:
    for c in sent:
        x = c.lower()
        if ord('a') <= ord(x) and ord(x) <= ord('z'):
            dic[x] += 1

for k, v in dic.items():
    print(k + ' : ' + str(v))

Solution (Python):
import sys
A = sys.stdin.read().lower()
Dir = {
'a' : 0,
'b' : 0,
'c' : 0,
'd' : 0,
'e' : 0,
'f' : 0,
'g' : 0,
'h' : 0,
'i' : 0,
'j' : 0,
'k' : 0,
'l' : 0,
'm' : 0,
'n' : 0,
'o' : 0,
'p' : 0,
'q' : 0,
'r' : 0,
's' : 0,
't' : 0,
'u' : 0,
'v' : 0,
'w' : 0,
'x' : 0,
'y' : 0,
'z' : 0
}
for a in A:
	if a in Dir:
		Dir[a] += 1
for i in Dir:
	print(i,':',Dir[i])

Solution (Python):
import sys
 
cnt = {}
 
for line in sys.stdin:
  for l in line:
    if l.isalpha():
      c = l.lower()
      cnt[c] = cnt.get(c,0)+1
 
for i in range(26):
  c = chr(ord('a')+i)
  print( c, " : ", cnt.get(c,0), sep = '' )

Solution (Python):
import sys

cnt = {}

for line in sys.stdin:
    for c in line:
        if c.isalpha():
            cl = c.lower()
            cnt[cl] = cnt.get(cl, 0) + 1

for i in range(97, 97 + 26):
    c = chr(i)
    print("{0} : {1}".format(c, cnt.get(c, 0)))

Solution (Python):
import sys, string
 
lines = []
for line in sys.stdin:
    lines.append(line)
 
text = ''.join(lines).lower()
     
for char in string.ascii_lowercase:
    print("{} : {}".format(char, text.count(char)))

Solution (Python):
import sys, string
 
lines = []
for line in sys.stdin:
    lines.append(line)
 
text = ''.join(lines).lower()
     
for char in string.ascii_lowercase:
    print("{} : {}".format(char, text.count(char)))

Solution (Python):
import sys

table = "abcdefghijklmnopqrstuvwxyz"

sentence = sys.stdin.read()
sentence1 = sentence.lower()
for i in table:
    print(i + ' : ' + str(sentence1.count(i)))

Solution (Python):
alphabet = [0]*26
i = 0;
for j in range(97,123):
    alphabet[i] = chr(j)
    i += 1
al_count = [0]*26
while True :
    try :
        words = raw_input().lower().split()
        for k in words :
            for l in list(k):
                if l=='a':
                    al_count[0] += 1
                elif l=='b':
                    al_count[1] += 1
                elif l=='c':
                    al_count[2]+=1  
                elif l=='d':
                    al_count[3] += 1
                elif l=='e':
                    al_count[4]+=1
                elif l=='f':
                    al_count[5] += 1
                elif l=='g':
                    al_count[6]+=1
                elif l=='h':
                    al_count[7] += 1
                elif l=='i':
                    al_count[8]+=1
                elif l=='j':
                    al_count[9] += 1
                elif l=='k':
                    al_count[10]+=1 
                elif l=='l':
                    al_count[11] += 1
                elif l=='m':
                    al_count[12]+=1 
                elif l=='n':
                    al_count[13] += 1
                elif l=='o':
                    al_count[14]+=1
                elif l=='p':
                    al_count[15] += 1
                elif l=='q':
                    al_count[16]+=1
                elif l=='r':
                    al_count[17] += 1
                elif l=='s':
                    al_count[18]+=1
                elif l=='t':
                    al_count[19] += 1
                elif l=='u':
                    al_count[20]+=1
                elif l=='v':
                    al_count[21]+=1
                elif l=='w':
                    al_count[22] += 1
                elif l=='x':
                    al_count[23]+=1
                elif l=='y':
                    al_count[24] += 1
                elif l=='z':
                    al_count[25]+=1
    except :
        break
for i in range(26):
    print '%c : %d' %(alphabet[i],al_count[i])

Solution (Python):
import string, sys
sen = sys.stdin.read().lower()

char_dic = {i:0 for i in string.ascii_lowercase}

for j in sen:
    if j in char_dic:
        char_dic[j] += 1

for k in string.ascii_lowercase:
    print("{} : {}".format(k, char_dic[k]))

Solution (Python):
d = {}
while 1:
    try:
        se = input().lower()
    except:
        break
    for i in se:
        if i.isalpha():
            d[i] = d.get(i, 0) + 1
for i in 'abcdefghijklmnopqrstuvwxyz':
    d[i] = d.get(i, 0)
    print("{} : {}".format(i, d[i]))

Solution (Python):
d = {}
while 1:
    try:
        se = input().lower()
    except:
        break
    for i in se:
        if i.isalpha():
            d[i] = d.get(i, 0) + 1
for i in 'abcdefghijklmnopqrstuvwxyz':
    d[i] = d.get(i, 0)
    print("{} : {}".format(i, d[i]))

Solution (Python):
a=''
while True:
    try:
        str = input().lower()
        a+=str
    except:
        break
for i in range(97, 97 + 26):
    count = 0
    for j in a:
        if chr(i) == j:
            count += 1
    print(chr(i), ':', count)

Solution (Python):
import sys
count = [0 for _ in range(ord("a"), ord("z") + 1)]
for line in sys.stdin:
    for c in list(line.lower()):
        if "a" <= c <= "z":
            count[ord(c) - ord("a")] += 1
for i, n in enumerate(count):
    print("{ch} : {cnt}".format(ch = chr(ord("a") + i), cnt = n))

Solution (Python):
count = [0 for _ in range(ord("a"), ord("z") + 1)]
while True:
    try:
        for c in list(input().lower()):
            if "a" <= c <= "z":
                count[ord(c) - ord("a")] += 1
    except EOFError:
        break
for i, n in enumerate(count):
    print("{ch} : {cnt}".format(ch = chr(ord("a") + i), cnt = n))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):print(chr(i),':',s.count(chr(i)))

Solution (Python):
import fileinput
a_dict = {chr(c): 0 for c in range(97, 123)}
for line in fileinput.input():
    line = line.lower()
    for c in line:
        if c in a_dict:
            a_dict[c] += 1

for k, v in a_dict.items():
    print('{0} : {1}'.format(k, v))

Solution (Python):


import sys

def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    counts = []
    for i in range(26): counts.append(0)

    lines = sys.stdin.readlines()

    for i in range(len(lines)):
        string = lines[i]
        
        for k in range(len(string)):
            c = string[k]
            if 97 <= ord(c) <= 122:
                counts[ord(c) - 97] += 1
            elif 65 <= ord(c) <= 90:
                counts[ord(c) - 65] += 1

    
    for i in range(26):
        print(chr(97 + i) + " : " + str(counts[i]))

if __name__ == "__main__":
    main()

Solution (Python):


import sys

def main():
    counts = []
    for i in range(26): counts.append(0)

    lines = sys.stdin.readlines()

    for i in range(len(lines)):
        string = lines[i]
        for k in range(len(string)):
            c = string[k]
            if 97 <= ord(c) <= 122:
                counts[ord(c) - 97] += 1
            elif 65 <= ord(c) <= 90:
                counts[ord(c) - 65] += 1

    
    for i in range(26):
        print(chr(97 + i) + " : " + str(counts[i]))

if __name__ == "__main__":
    main()

Solution (Python):
import sys
l=[0]*26
for h in sys.stdin:
    for i in h:
        k=ord(i.lower())
        if 96<k<123:l[k-97]+=1
for i in range(26):print chr(i+97),':',l[i]

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):print(chr(i),':',s.count(chr(i)))

Solution (Python):
import fileinput

d = {chr(k) : 0 for k in range(97, 123)}
for line in fileinput.input():
    for c in line.lower():
        if c in d:
            d[c] += 1

for k, v in d.items():
    print("{0} : {1}".format(k, v))

Solution (Python):
import sys
counts = [0] * 26

s = sys.stdin.read()
	
for c in s:
	o = ord(c)
	if o >= 65 and o <= 90:
		counts[o - 65] += 1
	elif o >= 97 and o <= 122:
		counts[o - 97] += 1
	
for i in range(len(counts)):
	print(chr(i + 97) + ' : ' + str(counts[i]))

Solution (Python):
s = ""
while True:
    try:
        s += input()
    except EOFError:
        break
s = s.lower()
d = dict()
for c in "abcdefghijklmnopqrstuvwxyz":
    d[c] = 0
for c in s:
    if c in "abcdefghijklmnopqrstuvwxyz":
        d[c] += 1
for c in "abcdefghijklmnopqrstuvwxyz":
    print(f"{c} : {d[c]}")

Solution (Python):
import sys

inp = sys.stdin
counter = {}

for text in inp:
    for a in text:
        a = a.lower()
        counter[a] = counter.get(a,0) + 1

for x in range(26):
    a = chr(ord('a')+x)
    print("{0} : {1}".format(a,counter.get(a,0)),sep='')

Solution (Python):
all_text = []
while True:
    try:
        text = input().split()
        all_text.extend(text)
    except EOFError:
        break
text = ''.join(all_text)

count = [0]*32
for letter in text:
    i = ord(letter)
    if i < 64:
        continue
    else:
        i %= 32
    if i:
        count[i] += 1

for i in range(26):
    print(chr(i+ord('a')), ':', count[i+1])

Solution (Python):

import sys

charList = list('abcdefghijklmnopqrstuvwxyz')
lines = sys.stdin.readlines()
combinedLine = ""
for line in lines:
    line = line.strip("\n").lower()
    combinedLine += line
totalSentence = list(combinedLine)


for char in charList:
    count = 0
    for i in range(len(totalSentence)):
        if totalSentence[i] == char:
            count += 1
    print(char + ' : ' + str(count))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):
    print(chr(i),':',s.count(chr(i)))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):
    print(chr(i),':',s.count(chr(i)))

Solution (Python):
import string
c = {}
while True:
    try:
        for x in raw_input().lower():
            if not x.isalpha():
                continue
            c[x] = c.get(x, 0) + 1
    except EOFError, e:
        break

for x in string.ascii_lowercase:
    print("%s : %d" % (x, c.get(x, 0)))

Solution (Python):
import sys

x = [0 for i in range(26)]
c0 = 97
for line in sys.stdin:
    for c in line.strip('\n').lower():
        if 'a' <= c and c <= 'z':
            x[ord(c)-c0] += 1

for i in range(26):
    print '%s : %d' %(chr(i + c0), x[i])

Solution (Python):
s = []
while True:
    try: 
        x = raw_input()
    except:
        break
    s.append(x.lower())
s = ''.join(s)

for i in range(26):
    c = chr(i + 97)
    print '%s : %d' %(c, s.count(c))

Solution (Python):
c=[0]*26
while 1:
        try:
                t=list(raw_input().lower())
                for i in range(len(t)):
                        if 0<=ord(t[i])-ord("a")<=25:
                                c[ord(t[i])-ord("a")]+=1
        except EOFError:
                break
for i in range(26):
        print chr(ord("a")+i),":",c[i]

Solution (Python):
from __future__ import division, print_function
from sys import stdin
cnt = [0] * 127
for c in stdin.read().lower():
    cnt[ord(c)] += 1
for i in range(ord('a'), ord('z')+1):
    print(chr(i), ':', cnt[i])

Solution (Python):
import time
import sys
import io
import re
import math

i = [0]*127

for x in sys.stdin.read().lower():
    i[ord(x)]+=1
for y in range(ord('a'), ord('z')+1):
    print chr(y)+ ' : ' + str(i[y])

Solution (Python):
import sys
dic = [['a', 0], ['b', 0], ['c', 0], ['d', 0], ['e', 0], ['f', 0], ['g', 0], ['h', 0], ['i', 0], ['j', 0], ['k', 0], ['l', 0], ['m', 0], ['n', 0], ['o', 0], ['p', 0], ['q', 0], ['r', 0], ['s', 0], ['t', 0], ['u', 0], ['v', 0], ['w', 0], ['x', 0], ['y', 0], ['z', 0]]  
for s in sys.stdin.read().lower():
	if s == '':
		break
	for i in s:
		for j in range(0, 26):
			if dic[j][0] == i.lower():
				dic[j][1] += 1
				break
for i in range(0, 26):
	print dic[i][0], ':', dic[i][1]

Solution (Python):
b = [0]*26
while True:
    try: 
        a = raw_input()
        for i in a:
            c = ord(i.lower())
            if c>= ord("a") and c <= ord("z"):
                b[c-ord("a")] +=1
    except EOFError,e:
        break
for i,v in enumerate(b):
    print "{0} : {1}".format(chr(i+ord("a")),v)

Solution (Python):
import sys
az =["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"]
sum_az = [0 for x in range(26)]

for x in sys.stdin.read().lower():
    for i in range(26):
        for j in range(len(x)):
            if x[j] == az[i]:
                sum_az[i] += 1


for i in range(26):
    print ("%s : %d" % (az[i], sum_az[i]))

Solution (Python):
import sys
az =["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"]
sum_az = [0 for x in range(26)]

for x in sys.stdin.read().lower():
    for i in range(26):
        if x == az[i]:
            sum_az[i] += 1


for i in range(26):
    print ("%s : %d" % (az[i], sum_az[i]))

Solution (Python):
text = ""
ans = [0 for i in range(26)]
while True:
	try:
		text += raw_input().lower()
	except:
		for s in text:
			if s.isalpha():
				ans[ord(s)-97] += 1
		for j in range(len(ans)):
			print "{} : {}".format(chr(j+97),ans[j])
		break

Solution (Python):
s = ''
while True:
    try:
        s += input().lower()
    except EOFError:
        break

for c in 'abcdefghijklmnopqrstuvwxyz':
    print('{} : {}'.format(c, s.count(c)))

Solution (Python):
cnt = [0 for i in range(26)]
while True:
      try:
            s = input()
      except:
            break
      for i in range(len(s)):
            m = ord(s[i])-ord('A')
            if(m >= 0 and m < 26):
                  cnt[m]+=1
            m = ord(s[i])-ord('a')
            if(m >= 0 and m < 26):
                  cnt[m]+=1
for i in range(26):
      print(chr(i+ord('a')),":",cnt[i])

Solution (Python):
from string import ascii_lowercase, ascii_uppercase
s = open(0).read()
ans = [0]*26
for c in s:
    i = ascii_lowercase.find(c)
    if i > -1:
        ans[i]+=1
    i = ascii_uppercase.find(c)
    if i > -1:
        ans[i]+=1

for c, t in zip(ascii_lowercase,ans):
    print("%s : %d"%(c,t))

Solution (Python):
a = []
try:
    while True:
        a.append(input())
except EOFError:
    pass

for i in range(len(a)):
    a[i] = a[i].lower()

b=" ".join(a)

for j in "abcdefghijklmnopqrstuvwxyz":
    print(j,":",b.count(j))

Solution (Python):
data = ""
data_1 = [chr(ord('a') + i) for i in range(26)]
while True:
    try:
        data += input().lower()
    except EOFError:
        break
for i in data_1:
    j = data.count(i)
    print(f'{i} : {j}')

Solution (Python):
cnt = [0 for i in range (26)]
alphabet = 'abcdefghijklmnopqrstuvwxyz'
str = open(0).read()
for x in str:
    for k in range(len(alphabet)):
        if x == alphabet[k] or x == alphabet[k].upper():
            cnt[k] = cnt[k] + 1
            break

for i in range(26):
    print(alphabet[i], ':', cnt[i])

Solution (Python):
import sys
texts=sys.stdin.read()
texts=texts.lower()
cnt=[0]*26

letters=list('abcdefghijklmnopqrstuvwxyz')
for x in texts:
    i=0
    for y in letters:
        if x==y:
            cnt[i]+=1
        i+=1
for i in range(26):
    print(letters[i]+" : "+str(cnt[i]))

Solution (Python):
import sys
cnts={}
for line in sys.stdin:
	for c in list(line.lower()): cnts[c]=cnts.get(c,0)+1

for c in range(ord('a'),ord('z')+1): print(chr(c),':',cnts.get(chr(c),0))

Solution (Python):
alpha = "abcdefghijklmnopqrstuvwxyz"
A = [0]*26

while True :
    try :
        n = input()
        
        for i in range(len(n)) :
            if n[i] in alpha or n[i].lower() in alpha :
                A[alpha.index(n[i].lower())] += 1
    except :
        break
    
for j in range(len(A)) :
    print(alpha[j], ":", A[j])

Solution (Python):
import re,sys
al=[chr(ord('a')+i) for i in range(26)]
s=sys.stdin.read().lower()
for i in range(26):
    cnt=len(re.findall(al[i],s))
    print("{} : {}".format(al[i],cnt))

Solution (Python):
import sys
texts=sys.stdin.read()
texts=texts.lower()
cnt=[0]*26

letters=list('abcdefghijklmnopqrstuvwxyz')
for x in texts:
    i=0
    for y in letters:
        if x==y:
            cnt[i]+=1
        i+=1
for i in range(26):
    print(letters[i]+" : "+str(cnt[i]))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):
    print(chr(i),':',s.count(chr(i)))

Solution (Python):
s=[0]*26
try:
    while True:
        n=str(input())
        n=n.lower()
        
        for i in range(len(n)):
            if 97<=ord(n[i])<=122:
                s[ord(n[i])-97]+=1
except EOFError:pass
for j in range(26):
    print(chr(j+97),':',s[j])

Solution (Python):
import sys
import string

sentence = sys.stdin.read().lower()
for c in string.ascii_lowercase:
    print('{} : {}'.format(c, sentence.count(c)))

Solution (Python):
count = [0 for i in range(26)]
while True:
    try:
        s = input()
    except:
        break
    for i in range(len(s)):
        m = ord(s[i]) - ord("a")
        if(m >= 0 and m <= 26):
            count[m] += 1
        m = ord(s[i]) - ord("A")
        if(m >= 0 and m <= 26):
            count[m] += 1
for i in range(26):
    print(chr(i + ord("a")), ":", count[i])

Solution (Python):
import sys
b=sys.stdin.read().lower()
for i in range(97,123):
    print(chr(i),':',(b.count(chr(i))))

Solution (Python):
import sys
a=sys.stdin.read().lower()
for i in range (ord("a"),ord("z")+1):
    print(chr(i), ":", a.count(chr(i)))

Solution (Python):
n = open(0)
n = n.read()
l1 = "abcdefghijklmnopqrstuvwxyz"
l2 = [0]*26

for i in n:
   for j in range(len(l1)):
      if i == l1[j] or i == l1[j].upper():
         l2[j] += 1

for i in range(len(l1)):
   print(l1[i], ":", l2[i])

Solution (Python):

import sys
a=[]
for i in sys.stdin.readlines():
    a.append(i.rstrip())
    
b=''.join(a)
x=str.lower(b)

for i in "abcdefghijklmnopqrstuvwxyz":
    countable=x.count(i)
    print(f'{i} : {countable}')

Solution (Python):
alphabet = [0 for i in range(26)]

while True:
    try:
        word = input()
    except:
        break
    word_s=str.lower(word)
    for i in range(len(word_s)):
        a = ord(word_s[i])-ord('a')
        if (a >= 0 and a < 26):
            alphabet[a]+=1
        
for i in range(26):
    print(chr(i+ord('a')),":",alphabet[i])

Solution (Python):


s=""
while True:
    try:
        s+=input()
    except:
        break
s=s.lower()
for i in range(ord("a"),ord("z")+1):
    print(chr(i)+" :",s.count(chr(i)))

Solution (Python):
count_al = list(0 for i in range(26))
while True :
    try :
        a = str(input())
        b = a.lower()
        for i in range(len(b)) :
            c = ord(b[i])
            if c > 96 and c < 123 :
                count_al[c - 97] += 1
    except EOFError :
        break
    
for i in range(97, 123) :
    print(chr(i), ":", count_al[i-97])

Solution (Python):
import string
text = ''
while True:
    try:
        text += input().lower()
    except EOFError:
        break
for chr in string.ascii_lowercase:
    print('{} : {}'.format(chr, text.count(chr)))

Solution (Python):
from string import ascii_lowercase as asc
import sys
sen = sys.stdin.read()
sent = list(sen.lower())
for i in asc:
	print(i,":",sent.count(i))

Solution (Python):
import sys
a=[]
for i in sys.stdin.readlines():
    a.append(i.rstrip())

b=''.join(a)
x=str.lower(b)

for i in "abcdefghijklmnopqrstuvwxyz":
    countable=x.count(i)
    print(f'{i} : {countable}')

Solution (Python):
s = ''
while True:
  try:
    s += input().lower()
  except EOFError:
    break
for i in range(97, 123):
  print(chr(i)+' : '+str(s.count(chr(i))))

Solution (Python):
import collections


s = ''
while True:
    try:
        s += input().lower()
    except EOFError:
        break
c = collections.Counter(s)
for i in range(97, 123):
    print("{} : {}".format(chr(i), c[chr(i)]))

Solution (Python):
English_sentence=''
try:
    while True:
        line=input()
        if line=='':
            break
        English_sentence+=line
except EOFError:
	pass
lowercase=['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']
uppercase=['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']
number=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
for _ in range(26):
    for _2 in English_sentence:
        if _2==lowercase[_] or _2==uppercase[_]:
            number[_]+=1
for ans in range(26):
    print("{0} : {1}".format(lowercase[ans],number[ans]))

Solution (Python):
import sys
a = [0]*26
s = sys.stdin.read().lower()
for i in map(chr, range(ord('a'), ord('z')+1)):
    print(i, ':', s.count(i))

Solution (Python):
a = ""
while True:
    try:
        a += input().lower()
    except:
        break
for i in range(ord("a"), ord("z")+1):
    print("{} : {}".format(chr(i), a.count(chr(i))))

Solution (Python):
x=[]
while True:
    try:
        z=list(input())
    except EOFError:
        break
    x=x+z
import collections
c=collections.Counter(x)
import string
a=string.ascii_letters
for i in range(26):
    print(a[i],":",(c[a[0+i]]+c[a[26+i]]))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):
    print(chr(i),':',s.count(chr(i)))

Solution (Python):
import sys, string
 
lines = []
for line in sys.stdin:
    lines.append(line)
 
text = ''.join(lines).lower()
     
for char in string.ascii_lowercase:
    print("{} : {}".format(char, text.count(char)))

Solution (Python):
import sys
s = sys.stdin.read()
s = s.lower()
alp = "qazxswedcvfrtgbnhyujmkiolp"
alp = sorted(alp)
for c in alp:
  print('{} : {}'.format(c,s.count(c)))

Solution (Python):
import sys
txt = sys.stdin.read().lower()
for i in "abcdefghijklmnopqrstuvwxyz":
    print(i,":",txt.count(i))

Solution (Python):
import sys
s = sys.stdin.read().lower()
a = {chr(i): 0 for i in range(ord('a'), ord('z')+1)}
for i in s:
    if ord(i) in range(ord('a'), ord('z')+1):
        a[i] += 1
[print(f'{k} : {v}') for k, v in a.items()]

Solution (Python):
count_al = list(0 for i in range(26))
while True :
    try :
        a = str(input())
        b = a.lower()
        for i in range(len(b)) :
            c = ord(b[i])
            if c > 96 and c < 123 :
                count_al[c - 97] += 1
    except EOFError :
        break
    
for i in range(97, 123) :
    print(chr(i), ":", count_al[i-97])

Solution (Python):
import sys
s = sys.stdin.read().lower()

al = [chr(ord("a") + i) for i in range(26)]

for a in al:
  c = 0
  c = s.count(a)
  print('{0} : {1}'.format(a, c))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):
 print(chr(i),":",s.count(chr(i)))

Solution (Python):
import sys
texts=sys.stdin.read()
texts=texts.lower()
cnt=[0]*26

letters=list('abcdefghijklmnopqrstuvwxyz')
for x in texts:
    i=0
    for y in letters:
        if x==y:
            cnt[i]+=1
        i+=1
for i in range(26):
    print(letters[i]+" : "+str(cnt[i]))

Solution (Python):
import sys
cnts = {}
for line in sys.stdin:
    for c in list(line.lower()): cnts[c] = cnts.get(c,0) + 1
  
for c in range(ord('a'),ord('z')+1): print(chr(c),':',cnts.get(chr(c),0))

Solution (Python):
import sys

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001


table = [0]*26

letters = "abcdefghijklmnopqrstuvwxyz"
input_str = sys.stdin.read()

for A in input_str:
    index = 0
    for B in letters:
        if A == B or A == B.upper():
            table[index] += 1
            
        index += 1

for i in range(len(letters)):
    print("%s : %d"%(letters[i],table[i]))

Solution (Python):
c=[]
S=[]
lst=[]
import string
a=string.ascii_letters
import collections
try:
    while True:
        lst=lst+list(input())
        
        
except EOFError:
    pass
c = collections.Counter(lst)

for i in range(26):
    print(a[i]+" : "+str(c[a[0+i]]+c[a[26+i]]))

Solution (Python):
a=input()
while True:
    try:
        a+=(str(input()))
    except EOFError:
        break
b=str.lower(a)
for i in range(ord('a'),ord('z')+1):
    count=0
    print(chr(i),':',end=' ')
    for j in range(len(b)):
        c=ord(b[j])
        if i==c:
            count+=1
    print(count)