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