#include <bits/stdc++.h>
using namespace std;
int t;
void solve() {
  int n, m;
  cin >> n >> m;
  string block_row(m, 'B');
  vector<string> result(n, block_row);
  result[0][0] = 'W';
  for (int i = 0; i < n; ++i) {
    cout << result[i] << endl;
  }
}
int main() {
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
