#include<cstdio>
#include<ctype.h>
#include<iostream>
#include <algorithm>
using namespace std;

int main(){
    int cut=1;
    char c[21]={0};
    for(int i=0;i<20;i++){
        scanf("%c",&c[i]);
        if(c[i]=='\n')break;
            cut++;
        if (48<=c[i]&&c[i]<=57)c[i]+=0;
        else if (65<=c[i]&&c[i]<=90)c[i]+=0;
        else if (97<=c[i]&&c[i]<=122)c[i]+=0;
        else{
            c[i]='\0';
            }
    }
    for(int j=cut;j>-1;--j){
        printf("%c",c[j]);
    }
        cout <<""<<endl;
    return 0;
}