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