#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;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8c3RyaW5nPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJdmVjdG9yPHN0cmluZz4gandvcmRzLCBld29yZHM7CglzdHJpbmcgaiwgZTsKCXdoaWxlKGNpbiA+PiBqICYmIGNpbiA+PiBlKQoJewoJCWp3b3Jkcy5wdXNoX2JhY2soaik7CgkJZXdvcmRzLnB1c2hfYmFjayhlKTsKCX0KCglmb3IoaW50IGUgPSAwLCBqID0gMDsgZSA8IGV3b3Jkcy5zaXplKCkgJiYgaiA8IGp3b3Jkcy5zaXplKCk7ICsrZSwgKytqKQoJewoJCWNvdXQgPDwgZXdvcmRzW2VdIDw8ICcgJyA8PCBqd29yZHNbal0gPDwgZW5kbDsKCX0KfQ==