// by poyon and altered by rintaro #include "testlib.h" #include using namespace std; int main() { registerValidation(); int N = inf.readInt(1, 500); inf.readSpace(); int K = inf.readInt(1, 100); inf.readSpace(); int Q = inf.readInt(1, 500); inf.readChar('\n'); auto check_string = [&](string S) -> void { int n = (int)S.size(); ensure(1 <= n && n <= 10); for (auto c : S) { ensure(islower(c)); } }; for (int i = 0; i < Q; i++) { int q = inf.readInt(1, 2); if (q == 1) { inf.readSpace(); string s = inf.readToken(); check_string(s); } else { set st; for (int j = 0; j < 6; j++) { inf.readSpace(); string t = inf.readToken(); inf.readSpace(); int d = inf.readInt(1, 100); if(st.count(t) == 1){cout<