fin = open('words.txt')
for line in fin:
    word = line.strip()
    def uses_only(word,letters):
        x = 0
        total = 0
        global total_words
        for i in range(len(word)):
            letter = word[x]
            x+=1
            if letter not in letters:
                return False
            if letter in letters:
                total +=1
        if total == len(word):
            print word
    uses_only(word, "acefhlo")


# A coach felloff each local calf

# available words are:
"""aa
aah
aal
ace
ache
achoo
ae
aff
ah
aha
ahchoo
ala
alae
alcohol
ale
alec
alee
alef
alfa
alfalfa
all
allele
allheal
aloe
aloha
aloof
cacao
cache
caeca
caecal
cafe
caleche
calf
call
calla
ceca
cecal
cee
cell
cella
cellae
cello
chafe
chaff
chalah
chaleh
challah
chef
chela
chelae
cholla
clach
clef
cloaca
cloacae
cloacal
cloche
coach
coal
coala
coalhole
coca
coccal
cochlea
cochleae
coco
cocoa
coff
coffee
coffle
coho
col
cola
cole
coo
cooch
cooee
coof
cool
each
eche
echo
ecole
eel
ef
eff
efface
eh
el
elf
ell
fa
face
faecal
fall
fallal
falloff
feal
fecal
fee
feel
fell
fella
fellah
felloe
feoff
feoffee
flea
fleche
flee
fleece
fleech
floc
floe
foal
focal
foe
foh
fool
ha
haaf
hae
hah
halala
halalah
hale
half
hall
hallah
hallel
hallo
halloa
halloo
halo
haole
he
heal
heel
hell
hellhole
hello
ho
hoe
hole
holla
hollo
holloa
holloo
hooch
hoof
la
lac
lace
lall
lea
leach
leaf
leal
lech
lee
leech
lo
loach
loaf
loca
local
locale
loch
loco
locofoco
loll
loo
loof
loofa
loofah
oaf
oca
oe
of
off
offal
oh
oho
ole
olea
oleo
olla
ooh"""
