Queue using Two Stacks

  • + 1 comment

    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])