#include<iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int main() {

	char str[20];
	int i, len=0;

	cin >> str;

	while (str[len]) 
		len++;

	for (i = len - 1; i >= 0; i--)
		cout << str[i];

	putchar('\n');

	return 0;

}
#include<iostream>
using namespace std;
int n, i, j;
char a[1005][1005];
int main(){
    cin>> n;
    for(i = 1; i <= n; i++){
        for(j = 1; j <= n; j++){
            a[i][j] = '.';
        }
    }
    if(n % 2 == 0){
        if(n == 2){
            cout<< -1;
            return 0;
        }
        for(i = 1; i < n; i += 2){
            a[i][i] = a[i + 1][i] = 'a';
            a[i][i + 1] = a[i + 1][i + 1] = 'b';
        }
        for(i = 1; i < n - 2; i += 2){
            a[i][i + 2] = a[i][i + 3] = 'c';
            a[i + 1][i + 2] = a[i + 1][i + 3] = 'd';
        }
        a[n - 1][1] = a[n - 1][2] = 'c';
        a[n][1] = a[n][2] = 'd';
    }
    else{
        if(n == 5 || n > 9){
            a[1][1] = a[1][2] = a[1][5] = a[2][5] = a[2][3] = a[3][3] = a[4][1] = a[4][2] = a[5][4] = a[5][5] = 'e';
            a[1][3] = a[1][4] = a[5][1] = a[5][2] = 'f';
            a[2][4] = a[3][4] = a[4][3] = a[5][3] = 'g';
            a[3][5] = a[4][5] = 'i';
            for(i = 6; i < n; i += 2){
                a[i][i] = a[i + 1][i] = 'a';
                a[i][i + 1] = a[i + 1][i + 1] = 'b';
            }
            for(i = 6; i < n - 2; i += 2){
                a[i][i + 2] = a[i][i + 3] = 'c';
                a[i + 1][i + 2] = a[i + 1][i + 3] = 'd';
            }
            a[n - 1][6] = a[n - 1][7] = 'c';
            a[n][6] = a[n][7] = 'd';
        }
        if(n == 3 || n == 9){
            for(i = 1; i < n; i += 3){
                for(j = 1; j < n; j += 3){
                    a[i][j] = a[i][j + 1] = 'a';
                    a[i + 1][j + 2] = a[i + 2][j + 2] = 'b';
                }
            }
        }
        if(n == 7){
            a[1][2] = a[1][3] = a[2][1] = a[3][1] = 'a';
            a[1][4] = a[1][5] = a[4][1] = a[5][1] = 'b';
            a[1][6] = a[1][7] = a[6][1] = a[7][1] = 'c';
            a[2][2] = a[2][3] = a[3][4] = a[3][5] = a[4][2] = a[5][2] = a[6][6] = a[7][6] = 'e';
            a[2][4] = a[2][5] = a[3][6] = a[3][7] = a[4][3] = a[5][3] = a[6][7] = a[7][7] = 'f';
        }
    }
    for(i = 1; i <= n; i++){
        for(j = 1; j <= n; j++){
            cout<< a[i][j];
        }
        cout<<"\n";
    }
}
