{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"","value":{"format":"MD","content":"Being a \u0027toxic\u0027 fanboy of a football player is not as easy as it seems. You have to keep track of the performance of your favorite player, as well as their rivals. But measuring a players performance is difficult. As the famous retired footballer and commentator, Ray Hudson once said regarding the performance of a player,\n\u003ccenter\u003e**It\u0027s not the statistics, you don\u0027t measure that with statistics!**\u003c/center\u003e\nIt is true. You can\u0027t measure art with statistics. Alas, your favorite player is nothing but statistics (and a few fake publicity stunts maybe). So you have no choice but to keep track of your favorite player\u0027s performances using statistics. To be more specific, you keep track of the number of goals scored by your favorite player in a match. So whenever the rival player does well in a match, you can counter that by saying, \"But my favorite player scored X goals once which is greater than the rival player!\"\n\nNow, to keep track of the \"performance\" of your favorite player, you define a set **S** that supports the following operations:\n- **A G**: Insert goal count **G** in **S**.\n- **R**: Remove the last inserted goal count.\n\nIt also supports the following query:\n- **Q**: Find the highest goal count from the values currently stored in **S**.\n\nSadly, your favorite player is also lagging behind in statistics nowadays. So you have decided to at least counter the rival fans faster. Your task in this problem is to design a system that performs these operations efficiently."}},{"title":"Input","value":{"format":"MD","content":"The input starts with an integer **T (1 ≤ T ≤ 25)** — the number of test cases.\nEach test case starts with an integer **X (1 ≤ X ≤ 10\u003csup\u003e5\u003c/sup\u003e)** — the number of operations performed.\nThe next **X** lines each contain an operation in the format specified in the problem statement.\nHere, **1 ≤ G ≤ 10\u003csup\u003e5\u003c/sup\u003e**."}},{"title":"Output","value":{"format":"MD","content":"For each test case, print the case number first.\nThen for each query, print the returned value in a newline. If there are no values in **S**, print \u0027Empty\u0027 (without the quotation marks)."}},{"title":"Sample Input","value":{"format":"MD","content":"```\n1\n4\nA 5\nQ\nR\nQ\n```"}},{"title":"Sample Output","value":{"format":"MD","content":"```\nCase 1:\n5\nEmpty\n```"}}]}