#include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(int argc, char* argv[]) {
registerValidation(argc, argv);
int Q = inf.readInt(1, 200000, "Q"); inf.readEoln();
for(int query = 1;query<=Q; query++) {
// version 1
//string cmd = inf.readToken("QUERY1|QUERY2|QUERY3|QUERY4|QUERY5|QUERY6|QUERY7|QUERY8|QUERY9|QUERY10");
// version 2
string cmd = inf.readToken();
ensuref(!(cmd != "QUERY1" && cmd != "QUERY2" && cmd != "QUERY3" && cmd != "QUERY4" && cmd != "QUERY5"
&& cmd != "QUERY6" && cmd != "QUERY7" && cmd != "QUERY8" && cmd != "QUERY9" && cmd != "QUERY10"), "cmd must be valid input");
if(cmd == "QUERY1") {
inf.readSpace();
string UU = inf.readToken("[A-Z]{1,10}", "U");
inf.readSpace();
ll L = inf.readLong(1, 1000000000000LL, "L");
}
inf.readEoln();
}
inf.readEof();
}
I2luY2x1ZGUgInRlc3RsaWIuaCIKI2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKCgppbnQgbWFpbihpbnQgYXJnYywgY2hhciogYXJndltdKSB7CgoKICAgIHJlZ2lzdGVyVmFsaWRhdGlvbihhcmdjLCBhcmd2KTsKCiAgICBpbnQgUSA9IGluZi5yZWFkSW50KDEsIDIwMDAwMCwgIlEiKTsgaW5mLnJlYWRFb2xuKCk7CgogICAgZm9yKGludCBxdWVyeSA9IDE7cXVlcnk8PVE7IHF1ZXJ5KyspIHsKCiAgICAgICAgLy8gdmVyc2lvbiAxCiAgICAgICAgLy9zdHJpbmcgY21kID0gaW5mLnJlYWRUb2tlbigiUVVFUlkxfFFVRVJZMnxRVUVSWTN8UVVFUlk0fFFVRVJZNXxRVUVSWTZ8UVVFUlk3fFFVRVJZOHxRVUVSWTl8UVVFUlkxMCIpOwogICAgICAgIAogICAgICAgIC8vIHZlcnNpb24gMgogICAgICAgIHN0cm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