#include <bits/stdc++.h>
int t, n, i, m, j;
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d", &n, &m);
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= m; j++) {
        if (i == 1 || j == 1)
          printf("B");
        else
          printf("W");
      }
      printf("\n");
    }
  }
  return 0;
}
