G=[nil,nil,nil,%w(a.. a.. .bb),%w(aabc ddbc efgg efhh),%w(abbcc ad..e fd..e f.ggh iijjh),%w(aabc.. ddbc.. ..eefg ..hhfg ij..kk ij..ll),%w(aabbcc. ..de..f ..de..f gh....i gh....i jj..kkl ..mmnnl)]
N=gets.to_i
A=N.times.map{?. * N}
def w x,j
  G[x].each do|g|
    s=?.*N
    s[j,x]=g
    puts s
  end
end
if N==2
  p -1
elsif N==3
  w 3,0
else
  m=N%4+4
  w m,0
  (N/4-1).times do|j|
    w 4,m+j*4
  end
end