counters = {chr(ch): 0 for ch in range(ord('a'), ord('z') + 1)}
print(counters)
file_name = input("Enter the name of the file to analyze: ")
f = open(file_name, "rt")
for line in f:
    for char in line:
        # If it is a letter...
        if char.isalpha():
# ... we'll treat it as lower-case and update the appropriate counter.
            counters[char.lower()] += 1
f.close()
#print(counters)
#Let's output the counters.

# for char in counters.keys():
#     cnt = counters[char]
#     if cnt > 0:
#         print(char, '->',cnt)

with open('natija.txt', "wt") as w:
    for char in counters.keys(): 
        cnt = counters[char]
        if cnt > 0:
            w.write(char+"->"+str(cnt)+"\n")
            
#a->3
#b->4
#c->5        