#include #include void swap(char *a, char *b) { char tmp; tmp = *b; *b = *a; *a = tmp; } int main() { char s[50] = {0}; scanf("%s", s); unsigned long i = strlen(s); for (int j = 0; j < i / 2; ++j) { swap(&s[j], &s[i - j - 1]); } printf("%s\n", s); return 0; }