#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
// For windows
#define READ_ONLY_FLAG 1
void stdInRedirect(FILE* dest)
{
#ifdef __linux__
stdin = dest;
#elif _WIN32
*stdin = *dest;
#else
#endif
}
void stdOutRedirect(FILE* dest)
{
#ifdef __linux__
stdout = dest;
#elif _WIN32
*stdout = *dest;
#else
#endif
}
int main(int argc, char* argv[])
{
int item, x, y;
FILE* fileIn = fopen("input.txt", "r");
FILE* fileOut = fopen("output.txt", "w");
FILE stdinTemp;
FILE stdoutTemp;
// backup stdio
stdinTemp = *stdin;
stdoutTemp = *stdout;
// override stdio
stdInRedirect(fileIn);
stdOutRedirect(fileOut);
scanf("%d",&x);
scanf("%d",&y);
printf("%d\n",x);
printf("%d\n",y);
while (scanf("%d%d%d", &item, &x, &y) == 3) {
printf("%d %d %d\n", item, x, y);
}
fclose(stdin);
fclose(stdout);
// restore stdio
stdInRedirect(&stdinTemp);
stdOutRedirect(&stdoutTemp);
printf("HHHHH");
return 0;
}
I2luY2x1ZGUgPHN5cy90eXBlcy5oPgojaW5jbHVkZSA8c3lzL3N0YXQuaD4KI2luY2x1ZGUgPGZjbnRsLmg+CiNpbmNsdWRlIDxlcnJuby5oPgojaW5jbHVkZSA8dW5pc3RkLmg+CiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8c3RkbGliLmg+CgovLyBGb3Igd2luZG93cwojZGVmaW5lIFJFQURfT05MWV9GTEFHIDEKCnZvaWQgc3RkSW5SZWRpcmVjdChGSUxFKiBkZXN0KQp7CiAgICAjaWZkZWYgX19saW51eF9fIAogICAgICAgIHN0ZGluID0gZGVzdDsKCSNlbGlmIF9XSU4zMgogICAgICAgICpzdGRpbiA9ICpkZXN0OwoJI2Vsc2UKCgkjZW5kaWYKfQoKdm9pZCBzdGRPdXRSZWRpcmVjdChGSUxFKiBkZXN0KQp7CiAgICAjaWZkZWYgX19saW51eF9f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