#include <iostream>
#include <string>
using namespace std;
int main() {
string s1, s2;
getline(cin, s1);
if(s1.length()<4){
cout << "Невозможно выполнить операцию." << endl;
} else {
s2=s1.substr(0, s1.length()-1);
s2+=s1[0];
s2+=s1[1];
s2+=s1[s1.length()-1];
}
cout << s2 << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglzdHJpbmcgczEsIHMyOwoJZ2V0bGluZShjaW4sIHMxKTsKCWlmKHMxLmxlbmd0aCgpPDQpewoJCWNvdXQgPDwgItCd0LXQstC+0LfQvNC+0LbQvdC+INCy0YvQv9C+0LvQvdC40YLRjCDQvtC/0LXRgNCw0YbQuNGOLiIgPDwgZW5kbDsKCX0gZWxzZSB7CgkJczI9czEuc3Vic3RyKDAsIHMxLmxlbmd0aCgpLTEpOwoJCXMyKz1zMVswXTsKCQlzMis9czFbMV07CgkJczIrPXMxW3MxLmxlbmd0aCgpLTFdOwoJfQoJY291dCA8PCBzMiA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0=