#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q--) {
    int x, y;
    cin >> x >> y;
    int cnt = 1;
    for (int i = 0; i < x; ++i) {
      for (int j = 0; j < y; ++j) cout << (cnt > 0 ? "W" : "B"), --cnt;
      cout << '\n';
    }
  }
}
