for _ in range(int(input())): testcase = input() if testcase == "P=NP": print("skipped") else: print(sum(map(int, testcase.split("+"))))