import random

words = ['education', 'physics', 'math', 'english', 'opportunity']

word = random.choice(words)
print(word)
s = ['''
+--------
|       !
|       
|         
|          
+==========''',
'''
+--------
|       !
|       0
|         
|          
+==========''',
'''
+--------
|       !
|       0
|       |  
|          
+==========''',
'''
+--------
|       !
|       0
|       |-
|          
+==========''',
'''
+--------
|       !
|       0
|      -|-
|          
+==========''',
'''
+--------
|       !
|       0
|      -|-
|      /   
+==========''',
'''
+--------
|       !
|       0
|      -|-
|      / \\
+==========''']
print('_' * len(word))
life = 0
found = ""
win = 0
while life < 6 and win == 0:
    win = 1
    print(s[life])
    letter = input('Enter letter: ')
    if letter not in word:
        life += 1
    else:
        found = found + letter
    i = 0
    while i < len(word):
        if word[i] in found:
            print(word[i], end="")
        else:
            print('.', end="")
            win = 0
        i += 1
if win == 1:
    print('YOU WON')
else:
    print(s[6])
    print('YOU LOST')