#include <string>
#include <iostream>
using namespace std;
int main()
{
string a;
getline(cin, a);
size_t first_start = 0;
size_t first_len = a.find(' ');
size_t last_start = a.rfind(' ') + 1;
size_t last_len = a.size() - last_start;
size_t mid_start = first_len;
size_t mid_len = last_start - first_len;
string b = a.substr(last_start, last_len)
+ a.substr(mid_start, mid_len)
+ a.substr(first_start, first_len);
std::cout << b << '\n';
}
I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IG1haW4oKQp7CiAgICBzdHJpbmcgYTsKICAgIGdldGxpbmUoY2luLCBhKTsKCiAgICBzaXplX3QgZmlyc3Rfc3RhcnQgPSAwOwogICAgc2l6ZV90IGZpcnN0X2xlbiA9IGEuZmluZCgnICcpOwoKICAgIHNpemVfdCBsYXN0X3N0YXJ0ID0gYS5yZmluZCgnICcpICsgMTsKICAgIHNpemVfdCBsYXN0X2xlbiA9IGEuc2l6ZSgpIC0gbGFzdF9zdGFydDsKCiAgICBzaXplX3QgbWlkX3N0YXJ0ID0gZmlyc3RfbGVuOwogICAgc2l6ZV90IG1pZF9sZW4gPSBsYXN0X3N0YXJ0IC0gZmlyc3RfbGVuOwoKICAgIHN0cmluZyBiID0gYS5zdWJzdHIobGFzdF9zdGFydCwgbGFzdF9sZW4pCiAgICAgICAgICAgICArIGEuc3Vic3RyKG1pZF9zdGFydCwgbWlkX2xlbikKICAgICAgICAgICAgICsgYS5zdWJzdHIoZmlyc3Rfc3RhcnQsIGZpcnN0X2xlbik7CgogICAgc3RkOjpjb3V0IDw8IGIgPDwgJ1xuJzsKfQo=