#include <bits/stdc++.h>
using namespace std;
const int N = 1000006;
int main() {
  int t, n, m, i, j;
  while (~scanf("%d", &t)) {
    while (t--) {
      scanf("%d%d", &n, &m);
      printf("W");
      for (i = 1; i < m; ++i) printf("B");
      printf("\n");
      for (i = 1; i < n; ++i) {
        for (j = 0; j < m; ++j) printf("B");
        printf("\n");
      }
    }
  }
  return 0;
}
