You are viewing a single comment's thread. Return to all comments →
q, i = [], input for i, *x in [map(int, i().split()) for _ in range(int(i()))]: q.append(*x) if i<2 else q.pop(0) if i<3 else print(q[0])
Seems like cookies are disabled on this browser, please enable them to open this website
Queue using Two Stacks
You are viewing a single comment's thread. Return to all comments →