#include <bits/stdc++.h>
#define oo 1000000007
#define maxN 100005
#define debug(a) cout << #a << " = " << a << endl
#define fdebug(a, x, y) { cout << #a << " : "; fto(_, x, y) cout << a[_] << ' '; cout << endl; }
#define fto(i, x, y) for(int i = (x); i <= (y); ++i)
#define fdto(i, x, y) for(int i = (x); i >= (y); --i)
#define ftoa(i, x, y, a) for(int i = (x); i <= (y); i += a)
#define fdtoa(i, x, y, a) for(int i = (x); i >= (y); i -= a)
#define mp make_pair
#define pb push_back
#define pf push_front
#define ll long long
#define lb lower_bound
#define ub upper_bound
#define ull unsigned long long
#define ii pair<int, int>
#define vi vector<int>
#define vii vector<ii>
#define FF first
#define SS second
using namespace std;
const string NAME = "template";
const int NTEST = 1000;
int main() {
srand(time(NULL));
for(int iTest = 1; iTest <= NTEST; iTest++) {
ofstream inp((NAME + ".inp").c_str());
int n = rand()%10000+1;
int m = rand()%10000+n;
int k = rand()%100+1;
inp << n << " " << m << " " << k;
inp.close();
system((NAME + ".exe").c_str());
system((NAME + "_trau.exe").c_str());
if(system(("fc " + NAME + ".out " + NAME + ".ans").c_str()) != 0) {
cout << "Test " << iTest << ": WRONG!\n";
return 0;
}
cout << "Test " << iTest << ": CORRECT!\n";
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CgojZGVmaW5lIG9vIDEwMDAwMDAwMDcKI2RlZmluZSBtYXhOIDEwMDAwNQojZGVmaW5lIGRlYnVnKGEpIGNvdXQgPDwgI2EgPDwgIiA9ICIgPDwgYSA8PCBlbmRsCiNkZWZpbmUgZmRlYnVnKGEsIHgsIHkpICB7IGNvdXQgPDwgI2EgPDwgIiA6ICI7IGZ0byhfLCB4LCB5KSBjb3V0IDw8IGFbX10gPDwgJyAnOyBjb3V0IDw8IGVuZGw7IH0KI2RlZmluZSBmdG8oaSwgeCwgeSkgZm9yKGludCBpID0gKHgpOyBpIDw9ICh5KTsgKytpKQojZGVmaW5lIGZkdG8oaSwgeCwgeSkgZm9yKGludCBpID0gK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