#include<bits/stdc++.h>
#define ll long long
#define rgi register int
#define rgl register ll
#define maxn 1005
#define mod 998244353LL
#define inf 1000000007LL
namespace lib
{
	using namespace std;
	class fastio
	{
		private:
			#define _NUMLEN 111
			char _num[_NUMLEN],_ch;
			int _f,_head;
			bool _useSTD;
		public:
			inline void ioSTD()
			{
				_useSTD=1;
				ios::sync_with_stdio(false);
				cin.tie(0),cout.tie(0);
			}
			inline void gc(char & _c)
			{
				if(_useSTD)cin>>_c;
				else _c=getchar();
			}
			inline void pc(char _c)
			{
				if(_useSTD)cout<<_c;
				else putchar(_c);
			}
			template<typename _T> inline fastio & operator - (_T & _x)
			{
				if(_useSTD)cin>>_x;
				else
				{
					_x=0;
					while(!isdigit(_ch)) _f|=_ch=='-',gc(_ch);
					while(isdigit(_ch)) _x=(_x<<1)+(_x<<3)+(_ch^48),gc(_ch);
					_f&&(_x=-_x,_f=0);
				}
				return *this; 
			}
			template<typename _T> inline fastio & operator + (_T _x)
			{
				if(_useSTD)cin>>_x;
				else
				{
					_T _k;
					if(_x==0) {pc('0'),pc(' ');return *this;}
					if(_x<0) pc('-'),_x=-_x;
					while(_x>0) _k=_x/10,++_head,_num[_head]=(_x-(_k<<1)-(_k<<3))^48,_x=_k;
					while(_head>0) pc(_num[_head]),--_head;
					pc(' ');
				}
				return *this; 
			}
			template<typename _T> inline fastio & operator >> (_T & _x) {cin>>_x;return *this;}
			template<typename _T> inline fastio & operator << (_T _x) {cout<<_x;return *this;}
			#define endln pc('\n')
		fastio() {_f=0,_head=0,_useSTD=0,_ch=' ';}
	}io;
	inline void fileio(string _r,string _w)
	{
		if(_r[0]!='-')freopen(_r.c_str(),"r",stdin);
		if(_w[0]!='-')freopen(_w.c_str(),"w",stdout);
	}
	#define mem(_x,_set) memset(_x,_set,sizeof(_x))
}using namespace lib;

void s3()
{
	cout<<"aab"<<endl;
	cout<<"b.b"<<endl;
	cout<<"baa"<<endl;
}
void s6()
{
	cout<<"aab..."<<endl;
	cout<<"b.b..."<<endl;
	cout<<"baa..."<<endl;
	cout<<"...aab"<<endl;
	cout<<"...b.b"<<endl;
	cout<<"...baa"<<endl;
}
void s7()
{
	cout<<"aab...c"<<endl;
	cout<<"b.b...c"<<endl;
	cout<<"baa...d"<<endl;
	cout<<"...aabd"<<endl;
	cout<<"...b.bc"<<endl;
	cout<<"...baac"<<endl;
	cout<<"ccddcc."<<endl;
}
void s11()
{
	cout<<"aab......c."<<endl;
	cout<<"b.b......c."<<endl;
	cout<<"baa.......c"<<endl;
	cout<<"...aab....c"<<endl;
	cout<<"...b.b...c."<<endl;
	cout<<"...baa...c."<<endl;
	cout<<"......aab.c"<<endl;
	cout<<"......b.b.c"<<endl;
	cout<<"......baadd"<<endl;
	cout<<"cc..cc..d.."<<endl;
	cout<<"..cc..ccd.."<<endl;
}
char s4[9][9]={".....",
			   ".aadc",
			   ".bbdc",
			   ".ghff",
			   ".ghee"};
char s5[9][9]={"......",
			   ".aabcc",
			   ".b.bdd",
			   ".baacc",
			   ".cdc..",
			   ".cdc.."};

char square[maxn][maxn];

signed main()
{
	// fileio("tt.in","tt.out");
	io.ioSTD();
	int n,x=0,y;
	io>>n;
	if(n<3)
	{
		io<<(-1);
		return 0;
	}
	if(n==3){s3();return 0;}
	if(n==6){s6();return 0;}
	if(n==7){s7();return 0;}
	if(n==11){s11();return 0;}
	
	mem(square,'.');
	
	if(n%5)x=5-(n%5);
	y=(n-x*4)/5;
	for(rgi i=0;i<x;++i)
		for(rgi j=1;j<=4;++j)
			for(rgi k=1;k<=4;++k)
				square[i*4+j][i*4+k]=s4[j][k];
	for(rgi i=0;i<y;++i)
		for(rgi j=1;j<=5;++j)
			for(rgi k=1;k<=5;++k)
				square[x*4+i*5+j][x*4+i*5+k]=s5[j][k];
	
	for(rgi i=1;i<=n;++i)
	{
		for(rgi j=1;j<=n;++j)cout<<square[i][j];
		cout<<endl;
	}
	return 0;
}


Measured memory_bytes: 2304