#include using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; #define rep(i,n) for(ll i=0;i T div_floor(T a, T b) { return a / b - ((a ^ b) < 0 && a % b); } template T div_ceil(T a, T b) { return a / b + ((a ^ b) > 0 && a % b); } template inline bool chmin(T &x, U y) { return (y < x) ? (x = y, true) : false; } template inline bool chmax(T &x, U y) { return (x < y) ? (x = y, true) : false; } template ostream &operator<<(ostream &os, const vector &a){ if (a.empty()) return os; os << a.front(); for (auto e : a | views::drop(1)){ os << ' ' << e; } return os; } void dump(auto ...vs){ ((cout << vs << ' '), ...) << endl; } void solve() { ll N; cin>>N; vector S(N,string(N,'.')); if (N%2==0){ if (N==8 or N>=12){ assert(false); cout<<-1<<'\n'; return; } vector sub(N/2,string(N,'#')); if (N==2){ sub={"."}; } if (N==4){ sub={"#.",".."}; } if (N==6){ sub={"#..",".#.","..."}; } if (N==10){ sub={"#....",".#.#.","..#..",".#.#.","....."}; } rep(i,N){ rep(j,N){ if ((i+j)%2==0)S[i][j]='#'; } } rep(i,N/2){ rep(j,N/2){ S[2*i][2*j]=sub[i][j]; } } rep(i,N){ cout< sub(M,string(M,'.')); if (M%3==0 or M%3==2){ rep(i,M){ rep(j,M){ if ((i+j)%2==1){ sub[i][j]='#'; } } } rep(i,M){ if (i%3==1){ rep(j,M){ sub[i][j]='.'; } } if (i%6==4){ sub[i][0]='#'; } else{ sub[i][0]='.'; } } } else{ rep(i,M){ rep(j,M){ if ((i+1+j)%2==1){ sub[i][j]='#'; } } } rep(i,M){ if ((i+1)%3==1){ rep(j,M){ sub[i][j]='.'; } } if ((i+1)%6==4){ sub[i][0]='#'; } else{ sub[i][0]='.'; } } } rep(i,N){ rep(j,N){ if ((i+j)%2==0){ S[i][j]='#'; } } } rep(i,M){ rep(j,M){ S[2*i][2*j]=sub[i][j]; } } // rep(i,M){ // cout<sync_with_stdio(0); ll T=1; while (T--){ solve(); } return 0; }