#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    int n, m;
    cin >> n >> m;
    cout << "W";
    for (int i = 1; i < m; i++) cout << "B";
    cout << endl;
    for (int i = 1; i < n; i++) {
      for (int j = 1; j <= m; j++) {
        cout << "B";
      }
      cout << endl;
    }
  }
  return 0;
}
