UVa 12750

if chelsa fail to win three consecutive match then rafa will loose his job. so the answer is the number of match till the first lose.

Explanation
until three consecutive match where no win rafa would be a manager. so if three consecutive match has no win then rafa will loose his job

Implementations
test=int(input) for i in range(test): n=int(input) c=0 k=1 ans=0 while k<=n: a=(input) if ans==0: if a=='W': c=0 else: c+=1 if c==3: ans=k k+=1 if ans==0: ans="Yay! Mighty Rafa persists!" print('Case {}: {}'.format(i+1, ans))
 * 1) THIS IS PYTHON SOLUTION FOR UVA 12750
 * 2) KAFA RAFA AT CHELSA