#include <bits/stdc++.h>
#define endl "\n"
#define INT long long int

using namespace std;

char infile[100], outfile[100];
int A[110][110];
int main() {
	int I,a,b;
	for(I=1;I<=10;I++){
        sprintf(infile, ".%d.in", I);
        freopen(infile, "w", stdout);
        scanf("%d %d",&a, &b);
		printf("%d %d\n",a,b);
		A[a][b]=1;
    }
    for(I=11;I<=100;I++){
        sprintf(infile, ".%d.in", I);
        freopen(infile, "w", stdout);
        a= rand()%100+1;
        b= rand()%100+1;
        while(A[a][b]){
        	a= rand()%100+1;
        	b= rand()%100+1;
		}
		A[a][b]=1;
		printf("%d %d\n",a,b);
    }
}
