Can someone tell me why i am getting SIGTSTP error. What did I do wrong in the below python code:

` for _ in range(int(input())): s = input() n = len(s) longest = [] for i in range(n): if s[i]=='<': l = g = 0 j = i while s[j] == '<': l +=1 if j!=(n-1): j += 1 while s[j] == '>': g +=1 if j!=(n-1): j += 1 if l == g: longest.append(l+g) else: continue print(max(longest))`