# -*- coding: utf-8 -*-
import random
s1 = "konnichiwa"
s2 = 'fuel'
s3= 'desperado'
tuple1 = (s1, s2, s3)
sourceword = random.choice(tuple1)
sourceword1 = sourceword
guessword = ''
guesscount = 0
while True:
if sourceword != '':
letternumber = random.randrange(len(sourceword))
guessword += sourceword[letternumber]
sourceword = sourceword[letternumber + 1:] + sourceword[:letternumber]
if sourceword == '':
print guessword
break
playerword = raw_input('Enter your guess\n')
playerword = playerword.lower()
while True:
if playerword != sourceword1 or playerword == '':
playerword = raw_input('Wrong. Try again\n')
guesscount += 1
if guesscount > 0:
print 'Hint, it has this part in it:', sourceword1[random.randrange(0, len(sourceword1)/2):random.randrange(len(sourceword1)/2, len(sourceword1))]
if playerword == sourceword1 and guesscount <= 3:
print 'gratz. you stayed within guess margin'
break
elif playerword == sourceword1 and guesscount > 3:
print 'gratz. tho it took you some time'
break
raw_input('\n\nPr')
IyAtKi0gY29kaW5nOiB1dGYtOCAtKi0KaW1wb3J0IHJhbmRvbQpzMSA9ICJrb25uaWNoaXdhIgpzMiA9ICdmdWVsJwpzMz0gJ2Rlc3BlcmFkbycKdHVwbGUxID0gKHMxLCBzMiwgczMpCnNvdXJjZXdvcmQgPSByYW5kb20uY2hvaWNlKHR1cGxlMSkKc291cmNld29yZDEgPSBzb3VyY2V3b3JkCmd1ZXNzd29yZCA9ICcnCmd1ZXNzY291bnQgPSAwCndoaWxlIFRydWU6CglpZiBzb3VyY2V3b3JkICE9ICcnOgoJCWxldHRlcm51bWJlciA9IHJhbmRvbS5yYW5kcmFuZ2UobGVuKHNvdXJjZXdvcmQpKQoJCWd1ZXNzd29yZCArPSBzb3VyY2V3b3JkW2xldHRlcm51bWJlcl0KCQlzb3VyY2V3b3JkID0gc291cmNld29yZFtsZXR0ZXJudW1iZXIgKyAxOl0gKyBzb3VyY2V3b3JkWzpsZXR0ZXJudW1iZXJdCgkKCWlmIHNvdXJjZXdvcmQgPT0gJyc6CgkJcHJpbnQgZ3Vlc3N3b3JkCgkJ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