low = 0
high = 1000
status=0
prev=0
while status!="right":
    mid=(high+low)/2
    if prev!=mid:
        print("I guess your number is ",mid,".")
        status=input("Is this guess low, high, or right? ")
        if status=="low":
            low=mid
            prev=mid
        elif status=="high":
            high=mid
            prev=mid
        elif status=="right":
            print("Your number is ",mid,". I WIN!!!!! Better luck next time :P")
            
        else:
            print("I didn't understand your input please try again")
    else:
        print("You are lying to me. Stop cheating and try again. -__-")
        status="right"
