#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main() {
  string s;
  cin >> s;
  if(s.size() == 2) {
    cout << s << endl;
  }
  else if(s.size() == 3) {
    for(int i = 2; i > -1; i--) {
      cout << s[i];
    }
    cout << endl;
  }
  return 0;
}

#include <iostream>
#include <vector>
                 
int main() {     
    std::vector<int> arr;
    int len, num = 0;
    std::cin >> len;
    for(int i = 0; i < len; i++) {
        std::cin >> num;
        arr.push_back(num);
    }            
    for(int i = len-1; i >= 0; i--) {
        std::cout << arr[i];
        if(i != 0) std::cout << " ";
    }            
    std::cout << std::endl;
    return 0;    
}