import string
fname=raw_input("File to read?")
words=string.split(open(fname,'r').read())
counts={}
for w in words:
  counts[w]=counts.get(w,0)+1
print counts
