#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < (m - 1); i++) {
    cout << "W";
  }
  cout << "B" << endl;
  for (int i = 0; i < (n - 1); i++) {
    for (int j = 0; j < (m); j++) {
      cout << "B";
    }
    cout << endl;
  }
}
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < (t); i++) {
    solve();
  }
  return 0;
}
