#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    int totCells = n * m;
    int w = (totCells - 1) / 2;
    int b = w + 1;
    for (int i = 0; i < n; i++) {
      string s = "";
      for (int j = 0; j < m; j++) {
        if (i == 0 && j == 0) {
          s += 'W';
        } else {
          s += 'B';
        }
      }
      cout << s << endl;
    }
  }
}
