description: The only difference between this problem and D1 is that you don't have to provide the way to construct the answer in D1, but you have to do it in this problem.
  
  There's a table of n × m cells (n rows and m columns). The value of n ⋅ m is even.
  
  A domino is a figure that consists of two cells having a common side. It may be horizontal (one of the cells is to the right of the other) or vertical (one of the cells is above the other).
  
  You need to place nm/2 dominoes on the table so that exactly k of them are horizontal and all the other dominoes are vertical. The dominoes cannot overlap and must fill the whole table.
  
  Input
  
  The first line contains one integer t (1 ≤ t ≤ 10) — the number of test cases. Then t test cases follow.
  
  Each test case consists of a single line. The line contains three integers n, m, k (1 ≤ n,m ≤ 100, 0 ≤ k ≤ nm/2, n ⋅ m is even) — the count of rows, columns and horizontal dominoes, respectively.
  
  Output
  
  For each test case:
  
    * print "NO" if it's not possible to place the dominoes on the table in the described way; 
    * otherwise, print "YES" on a separate line, then print n lines so that each of them contains m lowercase letters of the Latin alphabet — the layout of the dominoes on the table. Each cell of the table must be marked by the letter so that for every two cells having a common side, they are marked by the same letters if and only if they are occupied by the same domino. I.e. both cells of the same domino must be marked with the same letter, but two dominoes that share a side must be marked with different letters. If there are multiple solutions, print any of them. 
  
  Example
  
  Input
  
  
  8
  4 4 2
  2 3 0
  3 2 3
  1 2 0
  2 4 2
  5 2 2
  2 17 16
  2 1 1
  
  
  Output
  
  
  YES
  accx
  aegx
  bega
  bdda
  YES
  aha
  aha
  YES
  zz
  aa
  zz
  NO
  YES
  aaza
  bbza
  NO
  YES
  bbaabbaabbaabbaay
  ddccddccddccddccy
  NO
solution: /*
   * To change this license header, choose License Headers in Project Properties.
   * To change this template file, choose Tools | Templates
   * and open the template in the editor.
   */
  
  import java.io.BufferedReader;
  import java.io.DataInputStream;
  import java.io.FileInputStream;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.io.PrintWriter;
  import java.util.Arrays;
  import java.util.StringTokenizer;
  
  /**
   *
   * @author is2ac
   */
  public class D_CF {
  
      public static void main(String[] args) throws IOException {
          FastScanner58 fs = new FastScanner58();
          //Reader fs = new Reader();
          PrintWriter pw = new PrintWriter(System.out);
          int t = fs.ni();
          //int t = 1;
          for (int tc = 0; tc < t; tc++) {
              int h = fs.ni(), w = fs.ni();
              int k = fs.ni();
              int g = h*w/2 - k;
              boolean flag = true;
              if (h%2==1) {
                  if (w>k*2) flag = false;
                  k -= w/2;
                  if (k%2==1) flag = false;
              } else if (w%2==1) {
                  if (h>g*2) flag = false;
                  if (k%2==1) flag = false;
              } else {
                  if (k%2==1) flag = false;
              }
              if (!flag) {
                  pw.println("NO");
                  continue;
              } else {
                  pw.println("YES");
              }
              int[][] a = new int[h][w];
              for (int i = 0; i < h; i++) {
                  Arrays.fill(a[i],-1);
              }
              if (h%2==1) {
                  for (int j = 0; j < a[0].length; j+=2) {
                      placeh(0,j,a);
                  }
                  for (int i = 0; i < h; i++) {
                      for (int j = 0; j < w; j++) {
                          if (a[i][j]==-1) {
                              if (k>0) {
                                  k-=2;
                                  placeh(i,j,a);
                                  placeh(i+1,j,a);
                              } else {
                                  placev(i,j,a);
                                  placev(i,j+1,a);
                              }
                          }
                      }
                  }
              } else if (w%2==1) {
                  for (int i = 0; i < h; i+=2) {
                      placev(i,0,a);
                  }
                  for (int i = 0; i < h; i++) {
                      for (int j = 0; j < w; j++) {
                          if (a[i][j]==-1) {
                              if (k>0) {
                                  k-=2;
                                  placeh(i,j,a);
                                  placeh(i+1,j,a);
                              } else {
                                  placev(i,j,a);
                                  placev(i,j+1,a);
                              }
                          }
                      }
                  }
              } else {
                  for (int i = 0; i < h; i++) {
                      for (int j = 0; j < w; j++) {
                          if (a[i][j]==-1) {
                              if (k>0) {
                                  k-=2;
                                  placeh(i,j,a);
                                  placeh(i+1,j,a);
                              } else {
                                  placev(i,j,a);
                                  placev(i,j+1,a);
                              }
                          }
                      }
                  }
              }
              
              for (int i = 0; i < h; i++) {
                  StringBuilder sb = new StringBuilder();
                  for (int j = 0; j < w; j++) {
                      sb.append((char)(a[i][j]+'a'));
                  }
                  pw.println(sb);
              }
          }
          pw.close();
      }
      public static void placeh(int i, int j, int[][] a) {
          int l = findl(i,j,i,j+1,a);
          a[i][j] = l;
          a[i][j+1] = l;
      }
      public static void placev(int i, int j, int[][] a) {
          int l = findl(i,j,i+1,j,a);
          a[i][j] = l;
          a[i+1][j] = l;
      }
      public static int findl(int i, int j, int ip, int jp, int[][] a) {
          int[] x = {0,0,1,1,1,-1,-1,-1};
          int[] y = {-1,1,-1,0,1,-1,0,1};
          for (int l = 0; l < 26; l++) {
              boolean flag = true;
              for (int k = 0; k < 8; k++) {
                  int r = y[k] + i;
                  int c = x[k] + j;
                  if (r>-1 && c>-1 && r<a.length && c<a[r].length && a[r][c]==l) {
                      flag = false;
                      continue;
                  }
              }
              for (int k = 0; k < 8; k++) {
                  int r = y[k] + ip;
                  int c = x[k] + jp;
                  if (r>-1 && c>-1 && r<a.length && c<a[r].length && a[r][c]==l) {
                      flag = false;
                      continue;
                  }
              }
              if (flag) return l;
          }
          return -1;
      }
      public static boolean isPrime(int n) {
          if (n == 1) {
              return false;
          }
          for (int i = 2; i <= (int) Math.sqrt(n); i++) {
              if (n % i == 0) {
                  return false;
              }
          }
          return true;
      }
  
      public static int primes(int a) {
          int b = a;
          int ct = 0;
          for (int i = 2; i <= (int) Math.sqrt(b); i++) {
              if (a % i != 0) {
                  continue;
              }
              if (!isPrime(i)) {
                  continue;
              }
              int j = a / i;
              while (a % i == 0) {
                  a /= i;
                  ct++;
              }
              if (!isPrime(j)) {
                  continue;
              }
              if (j == 1) {
                  continue;
              }
              while (a % j == 0) {
                  a /= j;
                  ct++;
              }
          }
          return ct;
      }
  
      public static int dis(int a, int b, int n) {
          //for a to get to b
          if (a < b) {
              return b - a;
          }
          b += n;
          return b - a;
      }
  
      public static long gcd(long n1, long n2) {
          if (n2 == 0) {
              return n1;
          }
          return gcd(n2, n1 % n2);
      }
  }
  
  class GFG {
  
      // A utility function to get the
      // middle index of given range.
      static int getMid(int s, int e) {
          return s + (e - s) / 2;
      }
  
      /*
      * A recursive function to get the sum
      of values in given range of the array.
      * The following are parameters
        for this function.
      *
      * st -> Pointer to segment tree
      * node -> Index of current node in
      *         the segment tree.
      * ss & se -> Starting and ending indexes
      *         of the segment represented
      *         by current node, i.e., st[node]
      * l & r -> Starting and ending indexes
      *         of range query
       */
      static long MinUtil(long[] st, int ss,
              int se, int l,
              int r, int node) {
  
          // If segment of this node is completely
          // part of given range, then return
          // the max of segment
          if (l <= ss && r >= se) {
              return st[node];
          }
  
          // If segment of this node does not
          // belong to given range
          if (se < l || ss > r) {
              return (long) (1e11);
          }
  
          // If segment of this node is partially
          // the part of given range
          int mid = getMid(ss, se);
  
          return Math.min(
                  MinUtil(st, ss, mid, l, r,
                          2 * node + 1),
                  MinUtil(st, mid + 1, se, l, r,
                          2 * node + 2));
      }
  
      /*
      * A recursive function to update the
      nodes which have the given index in their
      * range. The following are parameters
      st, ss and se are same as defined above
      * index -> index of the element to be updated.
       */
      static void updateValue(long arr[], long[] st, int ss,
              int se, int index,
              long value,
              int node) {
          if (index < ss || index > se) {
              //System.out.println("Invalid Input");
              return;
          }
  
          if (ss == se) {
  
              // update value in array and in
              // segment tree
              arr[index] = value;
              st[node] = value;
          } else {
              int mid = getMid(ss, se);
  
              if (index >= ss && index <= mid) {
                  updateValue(arr, st, ss, mid,
                          index, value,
                          2 * node + 1);
              } else {
                  updateValue(arr, st, mid + 1, se, index,
                          value, 2 * node + 2);
              }
  
              st[node] = Math.min(st[2 * node + 1],
                      st[2 * node + 2]);
          }
          return;
      }
  
      // Return max of elements in range from
      // index l (query start) to r (query end).
      static long getMin(long[] st, int n, int l, int r) {
  
          // Check for erroneous input values
          if (l < 0 || r > n - 1 || l > r) {
              //System.out.printf("Invalid Input\n");
              return (long) (1e11);
          }
  
          return MinUtil(st, 0, n - 1, l, r, 0);
      }
  
      // A recursive function that constructs Segment
      // Tree for array[ss..se]. si is index of
      // current node in segment tree st
      static long constructSTUtil(long arr[],
              int ss, int se,
              long[] st, int si) {
  
          // If there is one element in array, store
          // it in current node of segment tree and return
          if (ss == se) {
              st[si] = arr[ss];
              return arr[ss];
          }
  
          // If there are more than one elements, then
          // recur for left and right subtrees and
          // store the max of values in this node
          int mid = getMid(ss, se);
  
          st[si] = Math.min(
                  constructSTUtil(arr, ss, mid,
                          st, si * 2 + 1),
                  constructSTUtil(arr, mid + 1,
                          se, st,
                          si * 2 + 2));
  
          return st[si];
      }
  
      /*
      * Function to construct segment tree from
      given array. This function allocates
      * memory for segment tree.
       */
      static long[] constructST(long arr[], int n) {
  
          // Height of segment tree
          int x = (int) Math.ceil(Math.log(n) / Math.log(2));
  
          // Maximum size of segment tree
          int max_size = 2 * (int) Math.pow(2, x) - 1;
  
          // Allocate memory
          long[] st = new long[max_size];
  
          // Fill the allocated memory st
          constructSTUtil(arr, 0, n - 1, st, 0);
  
          // Return the constructed segment tree
          return st;
      }
  }
  
  class BIT16 {
  
      long[] bit;
  
      public BIT16(int size) {
          bit = new long[size];
      }
  
      public void update(int ind, long delta) {
          while (ind < bit.length) {
              bit[ind] += delta;
              ind = ind + (ind & (-1 * ind));
          }
      }
  
      public long sum(int ind) {
          long s = 0;
          while (ind > 0) {
              s += bit[ind];
              ind = ind - (ind & (-1 * ind));
          }
          return s;
      }
  
      public long query(int l, int r) {
          return sum(r) - sum(l);
      }
  }
  
  class UnionFind18 {
  
      int[] id;
  
      public UnionFind18(int size) {
          id = new int[size];
          for (int i = 0; i < size; i++) {
              id[i] = i;
          }
      }
  
      public int find(int p) {
          int root = p;
          while (root != id[root]) {
              root = id[root];
          }
          while (p != root) {
              int next = id[p];
              id[p] = root;
              p = next;
          }
          return root;
      }
  
      public void union(int p, int q) {
          int a = find(p), b = find(q);
          if (a == b) {
              return;
          }
          id[b] = a;
      }
  }
  
  class Reader {
  
      final private int BUFFER_SIZE = 1 << 16;
      private DataInputStream din;
      private byte[] buffer;
      private int bufferPointer, bytesRead;
  
      public Reader() {
          din = new DataInputStream(System.in);
          buffer = new byte[BUFFER_SIZE];
          bufferPointer = bytesRead = 0;
      }
  
      public Reader(String file_name) throws IOException {
          din = new DataInputStream(new FileInputStream(file_name));
          buffer = new byte[BUFFER_SIZE];
          bufferPointer = bytesRead = 0;
      }
  
      public String readLine() throws IOException {
          byte[] buf = new byte[64];
          int cnt = 0, c;
          while ((c = read()) != -1) {
              if (c == '\n') {
                  break;
              }
              buf[cnt++] = (byte) c;
          }
          return new String(buf, 0, cnt);
      }
  
      public int ni() throws IOException {
          int ret = 0;
          byte c = read();
          while (c <= ' ') {
              c = read();
          }
          boolean neg = (c == '-');
          if (neg) {
              c = read();
          }
          do {
              ret = ret * 10 + c - '0';
          } while ((c = read()) >= '0' && c <= '9');
          if (neg) {
              return -ret;
          }
          return ret;
      }
  
      public long nextLong() throws IOException {
          long ret = 0;
          byte c = read();
          while (c <= ' ') {
              c = read();
          }
          boolean neg = (c == '-');
          if (neg) {
              c = read();
          }
          do {
              ret = ret * 10 + c - '0';
          } while ((c = read()) >= '0' && c <= '9');
          if (neg) {
              return -ret;
          }
          return ret;
      }
  
      public double nextDouble() throws IOException {
          double ret = 0, div = 1;
          byte c = read();
          while (c <= ' ') {
              c = read();
          }
          boolean neg = (c == '-');
          if (neg) {
              c = read();
          }
          do {
              ret = ret * 10 + c - '0';
          } while ((c = read()) >= '0' && c <= '9');
          if (c == '.') {
              while ((c = read()) >= '0' && c <= '9') {
                  ret += (c - '0') / (div *= 10);
              }
          }
          if (neg) {
              return -ret;
          }
          return ret;
      }
  
      private void fillBuffer() throws IOException {
          bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
          if (bytesRead == -1) {
              buffer[0] = -1;
          }
      }
  
      private byte read() throws IOException {
          if (bufferPointer == bytesRead) {
              fillBuffer();
          }
          return buffer[bufferPointer++];
      }
  
      public void close() throws IOException {
          if (din == null) {
              return;
          }
          din.close();
      }
  }
  
  class FastScanner58 {
  
      BufferedReader br;
      StringTokenizer st;
  
      public FastScanner58() {
          br = new BufferedReader(new InputStreamReader(System.in), 32768);
          st = null;
      }
  
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
  
      int ni() {
          return Integer.parseInt(next());
      }
  
      int[] intArray(int N) {
          int[] ret = new int[N];
          for (int i = 0; i < N; i++) {
              ret[i] = ni();
          }
          return ret;
      }
  
      long nl() {
          return Long.parseLong(next());
      }
  
      long[] longArray(int N) {
          long[] ret = new long[N];
          for (int i = 0; i < N; i++) {
              ret[i] = nl();
          }
          return ret;
      }
  
      double nd() {
          return Double.parseDouble(next());
      }
  
      String nextLine() {
          String str = "";
          try {
              str = br.readLine();
          } catch (IOException e) {
              e.printStackTrace();
          }
          return str;
      }
  }
  