#include <bits/stdc++.h>
using namespace std;
int main() {
  long long tc, a, b, d, n, m, n1, n2, c, e, y, z, i, j, k, temp, h, f, cnt, x4;
  string s, t;
  vector<long long> v, v1, v2, v3;
  vector<long long>::iterator it;
  v.push_back(0);
  long long c1 = 0, c2 = 0, c3 = 0, c4 = 0;
  cin >> tc;
  while (tc--) {
    cin >> n >> m;
    cout << "W";
    for (i = 0; i < m - 1; i++) {
      cout << "B";
    }
    cout << endl;
    for (i = 0; i < n - 1; i++) {
      for (j = 0; j < m; j++) {
        cout << "B";
      }
      cout << endl;
    }
  }
  return 0;
}
