#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5, inf = 1e18, mod = 1000000007;
const double PI = 3.1415926536;
int days[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
template <typename T>
ostream& operator<<(ostream& out, const vector<T>& mas) {
  for (const auto& x : mas) {
    out << x << ' ';
  }
  return out;
}
void ok() { cout << "YES" << '\n'; }
void no() { cout << "NO" << '\n'; }
inline long long nxt() {
  int x;
  cin >> x;
  return x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  int t = nxt();
  while (t--) {
    int n = nxt(), m = nxt();
    for (int i = 0; i < n - 1; i++) {
      cout << string(m, 'B') << '\n';
    }
    cout << string(m - 1, 'W') << "B" << '\n';
  }
  return 0;
}
