import re
lines = ["Where_can_i_find        red    capture    state",
"Why_are_you        orange    00:AO    state",
"Salty_pepper        gray    good    state",]
for line in lines:
	if line.strip().endswith('state') and any(line.strip().startswith(x) for x in ['Where_can_i_find','Salty_pepper']):
		print(line.split()[-2])
	