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