#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int a, b;
  while (t--) {
    cin >> a >> b;
    int m, n, c, d, e, bb = 0, ww = 0;
    for (int i = 1; i <= a; i++) {
      for (int j = 1; j <= b; j++) {
        if (i == a && j == b) {
          cout << "W";
          continue;
        }
        cout << "B";
      }
      cout << endl;
    }
  }
}
