let () = Scanf.scanf "%d\n" @@ fun n ->
  if 0 < n mod 3 && 0 < n mod 4
  then print_endline "-1"
  else begin
    let css = Array.make_matrix n n '.' in
    if n mod 3 = 0 then begin
      for i = 0 to n / 3 - 1 do
        for j = 0 to n / 3 - 1 do
          (*
           * aab
           * d b
           * dcc
           *)
          css.(3 * i).(3 * j) <- 'a';
          css.(3 * i).(3 * j + 1) <- 'a';
          css.(3 * i).(3 * j + 2) <- 'b';
          css.(3 * i + 1).(3 * j + 2) <- 'b';
          css.(3 * i + 2).(3 * j + 2) <- 'c';
          css.(3 * i + 2).(3 * j + 1) <- 'c';
          css.(3 * i + 2).(3 * j) <- 'd';
          css.(3 * i + 1).(3 * j) <- 'd';
        done
      done
    end else begin
      for i = 0 to n / 4 - 1 do
        for j = 0 to n / 4 - 1 do
          (* 
           * aacd
           * bbcd
           * cdaa
           * cdbb
           *)
          for k = 0 to 1 do
            for l = 0 to 1 do
              if k = l then begin
                css.(4 * i + 2 * k).(4 * j + 2 * l) <- 'a';
                css.(4 * i + 2 * k).(4 * j + 2 * l + 1) <- 'a';
                css.(4 * i + 2 * k + 1).(4 * j + 2 * l) <- 'b';
                css.(4 * i + 2 * k + 1).(4 * j + 2 * l + 1) <- 'b';
              end else begin
                css.(4 * i + 2 * k).(4 * j + 2 * l) <- 'c';
                css.(4 * i + 2 * k + 1).(4 * j + 2 * l) <- 'c';
                css.(4 * i + 2 * k).(4 * j + 2 * l + 1) <- 'd';
                css.(4 * i + 2 * k + 1).(4 * j + 2 * l + 1) <- 'd';
              end
            done
          done
        done
      done
    end;
    for i = 0 to n - 1 do
      for j = 0 to n - 1 do
        print_char css.(i).(j)
      done;
      print_newline ()
    done
  end
