#include<bits/stdc++.h>
using namespace std;
#define int long long
int t,n,m;
string s[1005];
signed main(){
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
cin>>t>>n>>m;
for(int i=1;i<=m;i++){
cin>>s[i];
}
for(int i=1;i<=n;i++){
string t,t1,ans="";
for(int j=1;j<=m;j++){
cin>>t>>t1;
if(ans!=""&&ans!="PION2202 RP++."){
continue;
}
if(t.substr(0,9)=="//freopen"||t1.substr(0,9)=="//freopen"){
ans="Wrong file operation takes you to your ancestors along with your 3 years' efforts on OI.";
}else{
t.erase(0,9),t1.erase(0,9);
reverse(t.begin(),t.end());
reverse(t1.begin(),t1.end());
t.erase(0,16);
t1.erase(0,18);
reverse(t.begin(),t.end());
reverse(t1.begin(),t1.end());
if(t==s[j]&&t1==s[j]){
ans="PION2202 RP++.";
}else{
ans="Good luck and have fun.";
}
}
}
cout<<ans<<'\n';
}
return 0;
}