#include <stdio.h>
void reverse_string(char *str) {
// Your logic here
int start = 0;
int end = 0;
while(str[end] != '\0'){ //Travers till we find the null char after last char
end ++;
}
end--; //To point the end character & not null char
while(start < end){
char temp = str[start];
str[start] = str[end];
str[end] = temp; //Swap the characters wrt start and end pointers until pointers overlap each other
start ++;
end --;
}
}
int main() {
char str[101];
fgets(str, sizeof(str), stdin);
// Remove newline
int i = 0;
while (str[i] != '\0') {
if (str[i] == '\n') {
str[i] = '\0';
break;
}
i++;
}
reverse_string(str);
printf("%s", str);
return 0;
}