#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, m, c = 0, d = 1;
  cin >> t;
  for (int i = 1; i <= t; ++i) {
    cin >> n >> m;
    if (n % 2 == 0 || m % 2 == 0) {
      for (int j = 1; j < n; ++j) {
        for (int k = 1; k <= m; ++k) {
          if (c % 2 == 0) {
            cout << "B";
            ++c;
          } else {
            cout << "W";
            ++c;
          }
        }
        cout << "\n";
      }
      cout << "BB";
      for (int p = 3; p <= m; ++p) {
        if (d % 2 == 0) {
          cout << "B";
          ++d;
        } else {
          cout << "W";
          ++d;
        }
      }
      cout << "\n";
    } else {
      for (int j = 1; j <= n; ++j) {
        for (int k = 1; k <= m; ++k) {
          if (c % 2 == 0) {
            cout << "B";
            ++c;
          } else {
            cout << "W";
            ++c;
          }
        }
        cout << "\n";
      }
    }
    c = 0;
    d = 1;
  }
  return 0;
}
