import sys while True: try: a,b = map(int,input().split()) c = map(int,input().split()) d = [] for line in sys.stdin: e = line.split() x = int(e[1]) y = int(e[2]) if e[0] == 'Q': if x>y: ...