#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  cin >> t;
  while (t--) {
    vector<char> v1;
    vector<vector<char> > v;
    long long int n, m, flag = 0, flag1 = 0;
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (i == 0 && j == 0)
          cout << "W";
        else
          cout << "B";
      }
      cout << endl;
    }
  }
}
