f = int(input())
for i in range(f):
a = int(input())
sta = []
for j in range(a):
ie = input()
if 'push' in ie:
sta.append(int(ie[-1]))
elif ie == 'pop':
if len(sta)==0:
print('Empty')
else:
sta.pop()
elif ie == 'query':
if len(sta)==0:
print('Anguei!')
else:
print(sta[-1])
elif ie == 'size':
print(len(sta))
结果是--RE--TLE--WA--
希望哪位大佬赐教一下