#include<bits/stdc++.h>
using namespace std;
int main(){
for(int i=1;;i++){
system("maker.exe > in.txt");
printf("Data Ready!\n");
system("baoli.exe < in.txt > ans.txt");
printf("Baoli Ready!\n");
system("std.exe < in.txt > out.txt");
printf("Std Ready!\n");
if(system("fc out.txt ans.txt")){
break;
}
printf("AC %d\n",i);
}
return 0;
}