#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <map>
using namespace std;

char s[10];
char t[10];
int main()
{
	int a = 0, b = 0, i = 0, j = 0;
	scanf ("%s",s);
    a = strlen(s);
    if (a == 2) printf ("%s",s);
	
    else printf ("%s",strrev(s));
	
    return 0;
	}