#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main() {
	vector<string> jwords, ewords;
	string j, e;
	while(cin >> j && cin >> e)
	{
		jwords.push_back(j);
		ewords.push_back(e);
	}

	for(int e = 0, j = 0; e < ewords.size() && j < jwords.size(); ++e, ++j)
	{
		cout << ewords[e] << ' ' << jwords[j] << endl;
	}
}