{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"\u003cp\u003eYou have an empty sequence, and you will be given $n$ queries. Each query is one of these three types:\u003c/p\u003e\n\n \u003cpre\u003e\u003ccode\u003e1 x - Push the element x into the stack.\n2 - Delete the element present at the top of the stack.\n3 - Print the maximum element in the stack.\u003c/code\u003e\u003c/pre\u003e\n\n\u003cp\u003e\u003cstrong\u003eInput Format\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe first line of input contains an integer, $n$. The next $n$ lines each contain an above-mentioned query.\u003c/p\u003e\n\n\u003cp\u003e\u003cstrong\u003eConstraints\u003c/strong\u003e\u003c/p\u003e\n- $1 \\le n \\le 10^5$\n- $1 \\le x \\le 10^9$\n- $1 \\le type \\le 3$\n- All queries are valid.\n\n\u003cp\u003e\u003cstrong\u003eSample Input\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e10\n1 97\n2\n1 20\n2\n1 26\n1 20\n2\n3\n1 91\n3\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003cstrong\u003eSample Output\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e26\n91\n\u003c/code\u003e\u003c/pre\u003e"}}]}