import random
while True:
	d=['r','p','s']
	g=random.choice(d)
	print(g)

s1=0
s2=0

	a=input("enter value r/p/s"):
	print("you choose'a',computer choose 'g',")
	if (a==g):
		print("it's a tie")
	elif(a=='r'):
		if(g==p)
		print("computer wins")
		s2+1
		if(g==s)
		print("you win")
		s1+1

	elif(a=='p'):
		if(g==r)
		print("you win")
		s1+=1
		if(g==s)
		print("computer wins")
		s2+=1

	elif(a=='s'):
		if(g==r)
		print("computer wins")
		s2+1
		if(g==p)
		print("you win")
		s1+=1
	elif(s1=3):
		print("you won the game")
	elif(s2=3):
		print("computer as won the game")
		break


		

