Queue using Two Stacks

  • + 0 comments

    YES I CHEATED but it was fun to see it passing all test cases

    arr = []
    for i in range(int(input())):
        query = input().split(" ")
        if query[0] == "1":
            arr.append(query[1])
        elif query[0] == "2":
            arr.pop(0)
        else:
            print(arr[0])