#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int n, m, i, j;
    cin >> n >> m;
    cout << 'W';
    for (i = 0; i < m - 1; i++) cout << 'B';
    cout << "\n";
    for (i = 1; i < n; i++) {
      for (j = 0; j < m; j++) cout << 'B';
      cout << "\n";
    }
  }
  cerr << "Time Taken:" << (float)clock() / CLOCKS_PER_SEC * 1000 << "ms"
       << "\n";
  return 0;
}
