#include<stdio.h>
void reverse(){
    char ch;
    (scanf("%c",&ch)!=1);
    return;
    if(char=='\n')
    return ;
    if(ch>='0'&&ch<=0)
    hasDigit=1;
    reverse();
    if(!hasDigit)
    printf("%c",ch);
}
int main(){
    reverse();
    if(hasDigit){
        printf("Invalid Input");
    }
    return 0;
}