#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int n = 101, m = 101;
  char a[n][m];
  while (t--) {
    cin >> n >> m;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        if (j == 1)
          a[i][j] = 'B';
        else
          a[i][j] = 'W';
        if (i == n) a[i][j] = 'B';
      }
    }
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        cout << a[i][j];
      }
      cout << "\n";
    }
  }
}
