import random
x=0
name=raw_input("Chao ban! Ban ten gi? ")
number=random.randint(1,20)
print('Chao '+ name + ' minh dang nghi 1 so tu 1 den 20. Ban hay doan no nhe: ')
while x<6:
print "Moi ban doan: "
guess=input()
guess=int(guess)
x+=1
if guess<number:
print "Ban doan nho hon rui!"
elif guess>number:
print "Ban doan lon hon rui!"
else: break
if guess==number:
print ('Ban doan dung rui! Nhung mat ' + str(x) +" lan de doan ra :P ")
else:
print('Ban doan sai rui. Con so minh dang nghi la: ' + str(number))