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