#include <bits/stdc++.h>
using namespace std;
const long long mx = 105;
const long long maxn = 1000001;
const long long mod = 1000000007;
vector<vector<int>> adj;
vector<int> res;
vector<int> ord;
vector<pair<long, long>> f1;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n, i, j, k, m;
    cin >> n >> m;
    for (i = 0; i < n - 1; i++) {
      for (j = 0; j < m; j++) {
        if (i % 2 == 0) {
          if (j % 2 == 0) {
            cout << "B";
          } else {
            cout << "W";
          }
        } else {
          if (j % 2 == 0) {
            cout << "W";
          } else {
            cout << "B";
          }
        }
      }
      cout << "\n";
    }
    if (n % 2 == 0 || m % 2 == 0) {
      for (j = 0; j < m - 2; j++) {
        if ((n - 1) % 2 == 0) {
          if (j % 2 == 0) {
            cout << "B";
          } else {
            cout << "W";
          }
        } else {
          if (j % 2 == 0) {
            cout << "W";
          } else {
            cout << "B";
          }
        }
      }
      cout << "BB\n";
    } else {
      for (j = 0; j < m; j++) {
        if ((n - 1) % 2 == 0) {
          if (j % 2 == 0) {
            cout << "B";
          } else {
            cout << "W";
          }
        } else {
          if (j % 2 == 0) {
            cout << "W";
          } else {
            cout << "B";
          }
        }
      }
      cout << "\n";
    }
  }
}
