#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
    vector<string> st;
    for(int i = 0;i<4;i++){
        string s;
        cin>>s;
        st.push_back(s);

    } 
    for(int i =0;i<4;i++){
        reverse(st[i].begin(), st[i].end());

    }
    for(int i = 0 ;i<4;i++){
        cout<<st[i]<<endl;

    }
    
}