#include <cstdio>

extern "C" int atoi(const char*);

int main(int argc, char* argv[])
{
    int id = 1;
    if (argc > 1) {
        id = atoi(argv[1]);
    }
    int m, k;
    while (scanf("%d%d", &k, &m) == 2) {
        char str[] = "00";
        sprintf(str, "%d", id);
        ++id;

        freopen(str, "wt", stdout);
        printf("%d %d\n", k, m);
        fclose(stdout);
    }

    return 0;
}
