import sys

fn = sys.argv[1]

if not fn:
  sys.exit(1)

hist = dict()
f = file(fn)
buf = f.read(1000)
while buf:
  for ch in buf:
    count = hist.get(ch, 0)
    count +=1
    hist.update({ch:count})
  buf = f.read(1000)
print hist
