"use strict";
var GET=(function(){function f(s){return new g(s);}function g(s){this._s=s.trim().split("\n");this._y=0;}g.prototype.a=function(f){var s=this._s, y=this._y, r;if(typeof s[y]==="string")s[y]=s[y].split(" ").reverse();r=s[y].pop();if(!s[y].length)this._y++;return f?r:+r;};g.prototype.l=function(f){var s=this._s[this._y++].split(" ");return f?s:s.map(a=>+a);};g.prototype.m=function(n,f){var r=this._s.slice(this._y,this._y+=n).map(a=>a.split(" "));return f?r:r.map(a=>a.map(a=>+a));};g.prototype.r=function(n,f){var r=this._s.slice(this._y,this._y+=n);return f?r:r.map(a=>+a);};return f;})();
var o=GET(require("fs").readFileSync("/dev/stdin","utf8"));
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill(0).map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill(0).map(x=>"+r+")";return eval(r);}

var ans;
console.log(main());
function main(){
  var n = o.a();
  if(n === 2)return -1;
  ans = Array(n).fill().map(a=>Array(n).fill("."));
  var flag = 1;
  while(flag){
    flag = 0;
    if(n % 3 === 0)solve3(0,n,0,n);
    else if(n % 4 === 0)solve4(0,n,0,n);
    else if(n % 5 === 0)solve5(n);
    else if(n % 7 === 0)solve7(n);
    else solve(n),n-=6,flag = 1;
  }
  return ans.map(a=>a.join("")).join("\n");
}

function solve3(yi,yn,xi,xn){
  for(var y = yi; y < yn; y+=3)for(var x = xi; x < xn; x+= 3){
    ans[y][x] = ans[y][x+1] = "a";
    ans[y+1][x+2] = ans[y+2][x+2] = "b";
  }
}
function solve4(yi,yn,xi,xn){
  for(var y = yi; y < yn-1; y+=4){
    ans[y][y] = ans[y][y+1] = "i";
    ans[y+1][y] = ans[y+1][y+1] = "j";
    ans[y+2][y+2] = ans[y+2][y+3] = "i";
    ans[y+3][y+2] = ans[y+3][y+3] = "j";
    ans[y][y+2] = ans[y+1][y+2] = "k";
    ans[y][y+3] = ans[y+1][y+3] = "l";
    ans[y+2][y] = ans[y+3][y] = "k";
    ans[y+2][y+1] = ans[y+3][y+1] = "l";
  }
}
function solve5(n){
  for(var x = 0; x < n;x += 5){
    ans[x][x] = ans[x][x+1] = "c";
    ans[x][x+2] = ans[x][x+3] = "d";
    ans[x+4][x+4] = ans[x+4][x+3] = "c";
    ans[x+4][x+2] = ans[x+4][x+1] = "d";
    ans[x][x+4] = ans[x+1][x+4] = "f";
    ans[x+2][x+4] = ans[x+3][x+4] = "g";
    ans[x+4][x] = ans[x+3][x] = "f";
    ans[x+2][x] = ans[x+1][x] = "g";
    solve3(x+1,x+4,x+1,x+4);
  }
}
function solve7(n){
  for(var x = 0; x < n;x += 7){
    ans[x][x] = ans[x][x+1] = "c";
    ans[x][x+2] = ans[x][x+3] = "d";
    ans[x][x+4] = ans[x][x+5] = "e";
    ans[1+x][x+6] = ans[2+x][x+6] = "c";
    ans[3+x][x+6] = ans[4+x][x+6] = "d";
    ans[5+x][x+6] = ans[6+x][x+6] = "e";
    solve3(x+1,x+7,x,x+6);
  }
}
function solve(n){
  solve3(n-6,n,n-6,n);
  ans[n-6][n-1] = ans[n-6][n-2] = "w";
  ans[n-6][n-3] = ans[n-5][n-3] = "x";
  ans[n-4][n-3] = ans[n-4][n-2] = "y";
  ans[n-4][n-1] = ans[n-5][n-1] = "z";
  ans[n-3][n-4] = ans[n-3][n-5] = "w";
  ans[n-3][n-6] = ans[n-2][n-6] = "x";
  ans[n-1][n-6] = ans[n-1][n-5] = "y";
  ans[n-1][n-4] = ans[n-2][n-4] = "z";
}