#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    string a = "", b = "";
    int fl = 0;
    for (int i = 0; i < m; i += 1) {
      a += (fl == 0 ? 'B' : 'W');
      fl = 1 - fl;
    }
    fl = 0;
    for (int i = 0; i < m; i += 1) {
      b += (fl == 0 ? 'W' : 'B');
      fl = 1 - fl;
    }
    vector<string> grid(n);
    fl = 0;
    for (int i = 0; i < n; i += 1) {
      grid[i] = (fl == 0 ? a : b);
      fl = 1 - fl;
    }
    if (n % 2 == 0 && m % 2 != 0)
      grid[n - 1][0] = 'B';
    else if (n % 2 == 0 && m % 2 == 0)
      grid[n - 1][0] = 'B';
    else if (n % 2 != 0 && m % 2 == 0)
      grid[n - 1][m - 1] = 'B';
    for (int i = 0; i < n; i += 1) {
      for (int j = 0; j < m; j += 1) cout << grid[i][j];
      cout << '\n';
    }
  }
}
