#include <bits/stdc++.h>
using namespace std;
signed idiot() {
  int n, m;
  cin >> n >> m;
  cout << "W";
  for (int i = 0; i < m - 1; i++) cout << "B";
  cout << '\n';
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << "B";
    }
    cout << '\n';
  }
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) idiot();
  return 0;
}
