#include <bits/stdc++.h>
using namespace std;
template <typename T>
void macro_scan(T& t) {
  cin >> t;
};
template <typename F, typename... R>
void macro_scan(F& f, R&... r) {
  cin >> f;
  macro_scan(r...);
}
void deb() { cerr << endl; }
template <typename T, typename... t>
void deb(T a, t... b) {
  cerr << a << " ";
  deb(b...);
}
template <typename T>
void dev(vector<T> v) {
  int c = 0;
  for (auto i : v) {
    cerr << i << " ";
    c++;
  }
  cerr << endl;
}
void done() {
  int n, m;
  macro_scan(n, m);
  ;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (i == 0 && j == 0)
        cout << "B";
      else if (i == 0)
        cout << "W";
      else
        cout << "B";
    }
    cout << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  for (; t--;) done();
}
