#include <stdio.h>
int main() {
int n,tgwgululu;
scanf("%d", &n);
while(n>0){
tgwgululu=n%10;
n=n/10;
printf("%d",tgwgululu);
}
return 0;