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