Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = 0
s = []
for i in range(20):
	print(l)
	stemp = str(input())
	s.append(stemp)
	if stemp[i] == 'Vacant':
		break
	elif i!=0:
		if s[i] == s[i-1]:
			if ((n-l)//2)%2 == 0:
				l = (n-l)//2
			else:
				l = (n-l)//2+1
		else:
			if l%2 == 0:
				l = l//2
				n = l
				s[i] = s[i-1]
			else:
				l = l//2+1
				n = l
				s[i] = s[i-1]
	elif i==0:
		if (n//2)%2==0:
			l = l+n//2
		else:
			l = l+(n//2)+1

Fixed submission:
n = int(input())
l = 0
s = []
start = [0]
end = [n]
check = 1

for i in range(20):
	print(l)
	stemp = str(input())
	s.append(stemp)
	if stemp == 'Vacant':
		break
	elif i!=0:
		if check == 1:
			if s[i-1] == s[i]:
				start[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					l = start[0]+(end[0]-start[0])//2+1
				
			else:
				end[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					l = start[0]+(end[0]-start[0])//2+1
				check = check*-1

		elif check == -1:
			if s[i-1] == s[i]:
				end[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					if abs((end[0]-start[0])) == 2:
						l = start[0]+(end[0]-start[0])//2
					else:
						l = start[0]+(end[0]-start[0])//2-1
				
			else:
				start[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					l = start[0]+(end[0]-start[0])//2+1
				check = check*-1
	else:
		if (n//2)%2==0:
			l = l+n//2
		else:
			l = l+(n//2)+1

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = 0
s = []
for i in range(20):
	print(l)
	stemp = str(input())
	s.append(stemp)
	if stemp[i] == 'Vacant':
		break
	elif i!=0:
		if s[i] == s[i-1]:
			if ((n-l)//2)%2 == 0:
				l = (n-l)//2
			else:
				l = (n-l)//2+1
		else:
			if l%2 == 0:
				l = l//2
				s[i] = s[i-1]
			else:
				l = l//2+1
				s[i] = s[i-1]
	elif i==0:
		if (n//2)%2==0:
			l = l+n//2
		else:
			l = l+(n//2)+1

Fixed submission:
n = int(input())
l = 0
s = []
start = [0]
end = [n]
check = 1

for i in range(20):
	print(l)
	stemp = str(input())
	s.append(stemp)
	if stemp == 'Vacant':
		break
	elif i!=0:
		if check == 1:
			if s[i-1] == s[i]:
				start[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					l = start[0]+(end[0]-start[0])//2+1
				
			else:
				end[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					l = start[0]+(end[0]-start[0])//2+1
				check = check*-1

		elif check == -1:
			if s[i-1] == s[i]:
				end[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					if abs((end[0]-start[0])) == 2:
						l = start[0]+(end[0]-start[0])//2
					else:
						l = start[0]+(end[0]-start[0])//2-1
				
			else:
				start[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					l = start[0]+(end[0]-start[0])//2+1
				check = check*-1
	else:
		if (n//2)%2==0:
			l = l+n//2
		else:
			l = l+(n//2)+1

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = 0
s = []
for i in range(20):
	print(l)
	stemp = str(input())
	s.append(stemp)
	if stemp[i] == 'Vacant':
		break
	elif i!=0:
		if s[i] == s[i-1]:
			if ((n-l)//2)%2 == 0:
				l = (n-l)//2
			else:
				l = (n-l)//2+1
	elif i==0:
		if (n//2)%2==0:
			l = l+n//2
		else:
			l = l+(n//2)+1

Fixed submission:
n = int(input())
l = 0
s = []
start = [0]
end = [n]
check = 1

for i in range(20):
	print(l)
	stemp = str(input())
	s.append(stemp)
	if stemp == 'Vacant':
		break
	elif i!=0:
		if check == 1:
			if s[i-1] == s[i]:
				start[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					l = start[0]+(end[0]-start[0])//2+1
				
			else:
				end[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					l = start[0]+(end[0]-start[0])//2+1
				check = check*-1

		elif check == -1:
			if s[i-1] == s[i]:
				end[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					if abs((end[0]-start[0])) == 2:
						l = start[0]+(end[0]-start[0])//2
					else:
						l = start[0]+(end[0]-start[0])//2-1
				
			else:
				start[0] = l
				if ((end[0]-start[0])//2)%2==0:
					l = start[0]+(end[0]-start[0])//2
				else:
					l = start[0]+(end[0]-start[0])//2+1
				check = check*-1
	else:
		if (n//2)%2==0:
			l = l+n//2
		else:
			l = l+(n//2)+1