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