#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  bool first = true;
  for (const auto& x : v) {
    if (!first) {
      os << " ";
    }
    first = false;
    os << x;
  }
  return os;
}
template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
  for (auto& elem : v) {
    is >> elem;
  }
  return is;
}
void solve() {
  int n, m;
  cin >> n >> m;
  if ((n * m) % 2) {
    for (int j = 0; j < n; j++) {
      for (int i = 0; i < m; i++) {
        if ((j + i) % 2 == 0) {
          cout << 'B';
        } else {
          cout << 'W';
        }
      }
      cout << endl;
    }
  } else {
    for (int i = 0; i < m; i++) {
      if (i % 2 == 0 && i > 0) {
        cout << 'W';
      } else {
        cout << 'B';
      }
    }
    cout << endl;
    for (int j = 1; j < n; j++) {
      for (int i = 0; i < m; i++) {
        if ((j + i) % 2 == 0) {
          cout << 'W';
        } else {
          cout << 'B';
        }
      }
      cout << endl;
    }
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  if (1) {
    int tests;
    cin >> tests;
    while (tests--) {
      solve();
    }
  } else {
    solve();
    cout << endl;
  }
  return 0;
}
