#include <bits/stdc++.h>
using namespace std;
int main() {
  int test;
  cin >> test;
  while (test--) {
    int n, m, arr[100][1000];
    cin >> n >> m;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        if (i == 1 && j == 1) {
          cout << "W";
          continue;
        } else
          cout << "B";
      }
      cout << "\n";
    }
  }
}
