#include <iostream>
#include <string>
void reverse_cout(std::string str) {
for(std::string::reverse_iterator rit = str.rbegin();
rit != str.rend(); ++rit)
std::cout << *rit;
}
int main() {
std::cout << "Enter a sentence/phrase: " << std::endl;
std::string phrase; std::getline(std::cin, phrase);
reverse_cout(phrase);
std::cout << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKdm9pZCByZXZlcnNlX2NvdXQoc3RkOjpzdHJpbmcgc3RyKSB7Cglmb3Ioc3RkOjpzdHJpbmc6OnJldmVyc2VfaXRlcmF0b3Igcml0ID0gc3RyLnJiZWdpbigpOwoJICAgIHJpdCAhPSBzdHIucmVuZCgpOyArK3JpdCkKCSAgICBzdGQ6OmNvdXQgPDwgKnJpdDsKfQoKaW50IG1haW4oKSB7CglzdGQ6OmNvdXQgPDwgIkVudGVyIGEgc2VudGVuY2UvcGhyYXNlOiAiIDw8IHN0ZDo6ZW5kbDsKCXN0ZDo6c3RyaW5nIHBocmFzZTsgc3RkOjpnZXRsaW5lKHN0ZDo6Y2luLCBwaHJhc2UpOwoJCglyZXZlcnNlX2NvdXQocGhyYXNlKTsKCXN0ZDo6Y291dCA8PCBzdGQ6OmVuZGw7CgkKCXJldHVybiAwOwp9