#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long power(long long x, long long y) {
  long long ans = 1;
  x = x % mod;
  while (y > 0) {
    if (y & 1) ans = (ans * x) % mod;
    y = y >> 1;
    x = (x * x) % mod;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  char a, b;
  long long t;
  cin >> t;
  while (t--) {
    cin >> n >> m;
    char arr[n][m];
    if (m % 2 == 0) {
      for (long long i = 0; i < n - 1; ++i) {
        if (i % 2 == 0) {
          a = 'B';
          b = 'W';
        } else {
          a = 'W';
          b = 'B';
        }
        for (long long j = 0; j < m; ++j) {
          if (j % 2 == 0)
            arr[i][j] = a;
          else
            arr[i][j] = b;
        }
      }
      if ((n - 1) % 2 == 0) {
        a = 'B';
        b = 'W';
      } else {
        a = 'W';
        b = 'B';
      }
      for (long long j = 0; j <= m - 3; ++j) {
        if (j % 2 == 0)
          arr[n - 1][j] = a;
        else
          arr[n - 1][j] = b;
      }
      arr[n - 1][m - 2] = arr[n - 1][m - 1] = 'B';
    } else if (n % 2 == 0) {
      for (long long i = 0; i < m - 1; ++i) {
        if (i % 2 == 0) {
          a = 'B';
          b = 'W';
        } else {
          a = 'W';
          b = 'B';
        }
        for (long long j = 0; j < n; ++j) {
          if (j % 2 == 0)
            arr[j][i] = a;
          else
            arr[j][i] = b;
        }
      }
      if ((m - 1) % 2 == 0) {
        a = 'B';
        b = 'W';
      } else {
        a = 'W';
        b = 'B';
      }
      for (long long j = 0; j <= n - 3; ++j) {
        if (j % 2 == 0)
          arr[j][m - 1] = a;
        else
          arr[j][m - 1] = b;
      }
      arr[n - 1][m - 1] = arr[n - 2][m - 1] = 'B';
    } else {
      for (long long i = 0; i < n; ++i) {
        if (i % 2 == 0) {
          a = 'B';
          b = 'W';
        } else {
          a = 'W';
          b = 'B';
        }
        for (long long j = 0; j < m; ++j) {
          if (j % 2 == 0)
            arr[i][j] = a;
          else
            arr[i][j] = b;
        }
      }
    }
    for (long long i = 0; i < n; ++i) {
      for (long long j = 0; j < m; ++j) cout << arr[i][j];
      cout << '\n';
    }
  }
  return 0;
}
