题解 | #【模板】队列#
【模板】队列
http://www.nowcoder.com/practice/afe812c80ad946f4b292a26dd13ba549
n=int(input())
ls1=[]
while n:
ls2=input().split(' ')
if len(ls2)>1:
ls1.append(int(ls2[1]))
if len(ls2)==1:
if ls1==[]:
print('error')
elif ls2[0]=='pop':
print(ls1.pop(0))
elif ls2[0]=='front':
print(ls1[0])
n-=1