#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, m, B, W;
  char res[112][112];
  scanf("%d", &t);
  while (t--) {
    memset(res, 0, sizeof(res));
    scanf("%d%d", &n, &m);
    B = ((n * m) / 2) + 1;
    W = (n * m) % 2 == 0 ? ((n * m) / 2) - 1 : ((n * m) / 2);
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        res[i][j] = 'B';
      }
    }
    res[n - 1][m - 1] = 'W';
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        printf("%c", res[i][j]);
      }
      puts("");
    }
  }
  return 0;
}
