#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    string ans[n];
    for (long long i = 0; i < n; i++) {
      ans[i] = string(m, 'B');
    }
    ans[n - 1][m - 1] = 'W';
    for (auto i : ans) cout << i << endl;
  }
  return 0;
}
