链接
#include<iostream>
#include<cstdio>
#include<cmath>
#include<string>
#include<queue>
#include<map>
#include<algorithm>
#include<cstring>
using namespace std;
inline int read() {
int x = 0,f = 1;char ch = getchar();
while (ch < '0' or ch > '9'){if (ch == '-') f = -1;ch = getchar();}
while (ch >= '0' and ch <='9'){x = x * 10 + ch - 48;ch = getchar();}
return x * f;
}
int t,n,m;
string a[1005],b[10];
void check() {
string a[20];
bool v = 1;
for(int i = 1;i <= 2 * m;i++) {
cin>>a[i];
int kk = a[i].size();
string s1 = "freopen(\"" + b[(i + 1) / 2] + ".in\",\"r\",stdin);",s2 = "freopen(\"" + b[(i + 1) / 2] + ".out\",\"w\",stdout);";
if(a[i].substr(0,10) == "//freopen(" and a[i].substr(kk - 2,2) == ");") {
printf("Wrong file operation takes you to your ancestors along with your 3 years' efforts on OI.\n");
return;
}
if(v == 0) continue;
if(i & 1) {
if(a[i] != s1){
v = 0;
}
}
else {
if(a[i] != s2) {
v = 0;
}
}
}
if(v) printf("PION2202 RP++.\n");
else printf("Good luck and have fun.\n");
return;
}
int main() {
t = read(),n = read(),m = read();
for(int i = 1;i <= m;i++) {
cin>>b[i];
}
while(n--) {
check();
}
return 0;
}