#include <iostream>
int main() {
std::string i;
std::cin >> i;
int l = i.length();
while (l < 4) {
std::cin >> i;
}
std::string f = i.substr(3, 1);
i.insert(3, f);
std::cout << i;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oKSB7CiAgICBzdGQ6OnN0cmluZyBpOwoKICAgIHN0ZDo6Y2luID4+IGk7CiAgICBpbnQgbCA9IGkubGVuZ3RoKCk7CgogICAgd2hpbGUgKGwgPCA0KSB7CiAgICAgICAgc3RkOjpjaW4gPj4gaTsKICAgIH0KCiAgICBzdGQ6OnN0cmluZyBmID0gaS5zdWJzdHIoMywgMSk7CiAgICBpLmluc2VydCgzLCBmKTsKCiAgICBzdGQ6OmNvdXQgPDwgaTsKICAgIHJldHVybiAwOwp9