#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    cout << "W" << string(m - 1, 'B') << endl;
    for (int i = 0; i < n - 1; i++) {
      cout << string(m, 'B') << endl;
    }
  }
  return 0;
}
