#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, n, m, i, j;
  scanf("%lld", &t);
  while (t--) {
    scanf("%lld %lld", &n, &m);
    string s[n + 1];
    for (i = 1; i <= n - 1; i++)
      for (j = 1; j <= m; j++) s[i] += 'B';
    for (j = 1; j <= m - 1; j++) s[i] += 'B';
    s[i] += 'W';
    for (i = 1; i <= n; i++) cout << s[i] << "\n";
  }
}
