#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t, n, a, b, c, d, s, i, j, flag;
  cin >> t;
  while (t--) {
    cin >> a >> b;
    for (i = 1; i <= a; i++) {
      for (j = 1; j <= b; j++) {
        if (i == 1 and j == 1)
          cout << "W";
        else
          cout << "B";
      }
      cout << endl;
    }
  }
  return 0;
  ;
}
