#include <bits/stdc++.h>
inline char opposite(char c) {
  if (c == 'B')
    return 'W';
  else
    return 'B';
}
void printLine(int len, char startChar) {
  char curChar = startChar;
  for (int i = 0; i < len; ++i) {
    std::cout << curChar;
    curChar = opposite(curChar);
  }
  std::cout << '\n';
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(NULL);
  int t;
  std::cin >> t;
  for (int i = 0; i < t; ++i) {
    int n, m;
    std::cin >> n >> m;
    char curChar = 'B';
    if ((n % 2 == 1) && (m % 2 == 1)) {
      printLine(m, 'B');
      curChar = 'W';
    } else {
      std::cout << 'B';
      printLine(m - 1, 'B');
    }
    for (int i = 1; i < n; ++i) {
      printLine(m, curChar);
      curChar = opposite(curChar);
    }
  }
}
