#include <bits/stdc++.h>
using namespace std;
const long long N = 1001;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long tests = 1;
  cin >> tests;
  for (long long testcase = 1; testcase <= tests; testcase++) {
    long long n, m;
    cin >> n >> m;
    cout << "W";
    for (long long i = 1; i < m; i++) cout << "B";
    cout << endl;
    for (long long i = 1; i < n; i++) {
      for (long long j = 0; j < m; j++) {
        cout << "B";
      }
      cout << endl;
    }
  }
}
