hdu1073
#include<iostream>
using namespace std;
#define N 5050
char a[N],b[N],tmp[N];
void Read(char p[])
{
getchar();
gets(tmp);
while(gets(tmp))
{
if(strcmp(tmp,"END")==0) break;
if(strlen(tmp)!=0) strcat(p,tmp);
strcat(p,"\n");
}
}
void Process(char p[])
{
int i,k,len;
k=0;
len=strlen(p);
for(i=0;i<len;i++)
if(p[i]!=' '&&p[i]!='\t'&&p[i]!='\n')
p[k++]=p[i];
p[k]='\0';
}
int main()
{
int T;
cin>>T;
while(T--)
{
a[0]='\0';
b[0]='\0';
Read(a);
Read(b);
if(strcmp(a,b)==0)
{
puts("Accepted");
continue;
}
else
{
Process(a);
Process(b);
if(strcmp(a,b)==0)
{
puts("Presentation Error");
continue;
}
}
puts("Wrong Answer");
}
return 0;
}