#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, m, i, j;
  cin >> n >> m;
  if ((n % 2) == 1 && (m % 2) == 1) {
    for (i = 1; i <= n - 1; i += 2) {
      for (j = 0; j < m; j++) {
        if (j % 2)
          cout << "W";
        else
          cout << "B";
      }
      cout << '\n';
      for (j = 0; j < m; j++) {
        if (j % 2)
          cout << "B";
        else
          cout << "W";
      }
      cout << '\n';
    }
    for (j = 0; j < m; j++) {
      if (j % 2)
        cout << "W";
      else
        cout << "B";
    }
    cout << '\n';
  } else if ((n % 2) == 0 && (m % 2) == 0) {
    for (i = 1; i < n - 1; i += 2) {
      for (j = 0; j < m; j++) {
        if (j % 2)
          cout << "W";
        else
          cout << "B";
      }
      cout << '\n';
      for (j = 0; j < m; j++) {
        if (j % 2)
          cout << "B";
        else
          cout << "W";
      }
      cout << '\n';
    }
    for (j = 0; j < m - 1; j++) {
      if (j % 2)
        cout << "W";
      else
        cout << "B";
    }
    cout << "B";
    cout << '\n';
    for (j = 0; j < m; j++) {
      if (j % 2)
        cout << "B";
      else
        cout << "W";
    }
    cout << '\n';
  } else {
    if (m % 2) {
      for (i = 1; i < n - 1; i += 2) {
        for (j = 0; j < m; j++) {
          if (j % 2)
            cout << "W";
          else
            cout << "B";
        }
        cout << '\n';
        for (j = 0; j < m; j++) {
          if (j % 2)
            cout << "B";
          else
            cout << "W";
        }
        cout << '\n';
      }
      for (j = 0; j < m; j++) {
        if (j % 2)
          cout << "W";
        else
          cout << "B";
      }
      cout << '\n';
      for (j = 0; j < m - 1; j++) {
        if (j % 2)
          cout << "B";
        else
          cout << "W";
      }
      cout << "B";
      cout << '\n';
    } else {
      for (i = 1; i <= n - 1; i += 2) {
        for (j = 0; j < m; j++) {
          if (j % 2)
            cout << "W";
          else
            cout << "B";
        }
        cout << '\n';
        for (j = 0; j < m; j++) {
          if (j % 2)
            cout << "B";
          else
            cout << "W";
        }
        cout << '\n';
      }
      for (j = 0; j < m - 1; j++) {
        if (j % 2)
          cout << "W";
        else
          cout << "B";
      }
      cout << "B";
      cout << '\n';
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int T = 1;
  cin >> T;
  while (T--) solve();
  return 0;
}
