#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, m;
  char color[100][100];
  for (int i = 0; i < 100; i++)
    for (int j = 0; j < 100; j++) color[i][j] = 'B';
  color[0][0] = 'W';
  scanf("%d", &t);
  while (t--) {
    scanf("%d %d", &n, &m);
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) putchar(color[i][j]);
      putchar('\n');
    }
  }
  return 0;
}
