'''
Created on Sep 18, 2013

@author: guestuser
'''
# connect file resource to your program and 
# convert it into a usable structure
d = open("boggle_dictionary.txt")
words = d.read().split("\n")

# count word properties
count = 0
for w in words:
    if len(w) == 5:
        print(w)
        count += 1
print(count)

# find longest word
longest = ''
for w in words:
    if len(w) > len(longest):
        longest = w
print(longest)
