#include<stdio.h>
#include<string.h>
int main()
{ int a,A,m,n,M,i,t,r;
char x[5006];char y[106];char c[100];char b[100];
char z[5006];char d[100];char e[100];
scanf("%d",&n);
while(n--)
{ gets(c);gets(x);gets(b);
gets(d);gets(z);gets(y);
m=strlen(y);a=strlen(x);A=strlen(z);
if(m){
if(a!=A)
{gets(e);printf("Presentation Error
");}
else {gets(e);
if(x[a]==z[a])// if(strcmp(x,z)==0)也用过,前面的问题没解决这里没法改
printf("Accepted
");
else printf("Wrong Answer
");}
}
else {gets(e);printf("Presentation Error
"); }
printf("%d %d
",a,A);
}
}