rt.
#include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#define IL inline
using namespace std;
const int N = 1e5 + 10;
const int INF = 0x3f3f3f3f;
string a[10];
IL int read()
{
int x = 0,f = 1;
char c = getchar();
while(c <'0'|| c >'9'){if(c == '-') f = -1;c = getchar();}
while(c >= '0' && c <= '9') x = x * 10 + c - '0',c = getchar();
return x * f;
}
void write(int x)
{
if(x < 0) putchar('-'),x = -x;
if(x > 9) write(x / 10);
putchar(x % 10 + '0');
}
int main()
{
int T, n, m;
cin >> T >> n >> m;
for(int i = 1;i <= m;i++)
{
cin >> a[i];
}
for(int i = 1;i <= n;i++)
{
string s1, s2;
bool norm = false, jzz = false;
for(int j = 1;j <= m;j++)
{
cin >> s1;
cin >> s2;
string crt1, crt2;
crt1 = "freopen(\"" + a[j] + ".in\",\"r\",stdin);";
crt2 = "freopen(\"" + a[j] + ".out\",\"w\",stdout);";
if(s1.substr(0, 10) == "//freopen(" && s1[s1.size() - 1] == ';' && s1[s1.size() - 2] == ')')
{
jzz = true;
}
else if(s2.substr(0, 10) == "//freopen(" && s2[s2.size() - 1] == ';' && s2[s2.size() - 2] == ')')
{
jzz = true;
}
if(jzz)
{
cout << "Wrong file operation takes you to your ancestors along with your 3 years' efforts on OI." << endl;
norm = false;
break;
}
if(j == 1)
{
norm = (s1 == crt1 && s2 == crt2);
}
else
{
norm = (s1 == crt1 && s2 == crt2) && norm;
}
// cout << s1 << endl << crt1 << endl << s2 << endl << crt2 << endl;
// cout << (s1 == crt1) << (s2 == crt2) << endl;
// cout << "---------";
}
if(norm)
{
cout << "PION2202 RP++." << endl;
}
else if(!jzz)
{
cout << "Good luck and have fun." << endl;
}
}
return 0;
}