let n = stdin.ReadLine() |> int

let flag = if ((n % 3) = 0) then 1 else 0

let con (c:char) = string c

let f a b = if ((a = b) && not (b % 3 = 2)) then (con 'a')
            elif ((a - b = 1) && not (b % 3 = 0)) then (con 'a')
            else (con '.')

if flag = 0 then (-1|>stdout.WriteLine) else
 for i in 1..n do
  [for j in 1..n -> (f i j)]
  |>List.fold (fun x y -> (x + y)) ""
  |>stdout.WriteLine