#include <bits/stdc++.h>
using namespace std;
const long long INF(0x3f3f3f3f3f3f3f3fll);
const int inf(0x3f3f3f3f);
namespace Polynomial {
const long long P = 998244353, g = 3, gi = 332748118;
static int rev[1000];
int lim, bit;
long long add(long long a, long long b) { return (a += b) >= P ? a - P : a; }
long long qpow(long long a, long long b) {
  long long prod = 1;
  while (b) {
    if (b & 1) prod = prod * a % P;
    a = a * a % P;
    b >>= 1;
  }
  return (prod + P) % P;
}
void calrev() {
  for (int i = 1; i < lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (bit - 1));
}
void NTT(long long *A, int inv) {
  for (int i = 0; i < lim; i++)
    if (i < rev[i]) swap(A[i], A[rev[i]]);
  for (int mid = 1; mid < lim; mid <<= 1) {
    long long tmp = qpow(inv == 1 ? g : gi, (P - 1) / (mid << 1));
    for (int j = 0; j < lim; j += (mid << 1)) {
      long long omega = 1;
      for (int k = 0; k < mid; k++, omega = (omega * tmp) % P) {
        int x = A[j + k], y = omega * A[j + k + mid] % P;
        A[j + k] = (x + y) % P;
        A[j + k + mid] = (x - y + P) % P;
      }
    }
  }
  if (inv == 1) return;
  int invn = qpow(lim, P - 2);
  for (int i = 0; i < lim; i++) A[i] = A[i] * invn % P;
}
static long long x[1000], y[1000];
void mul(long long *a, long long *b) {
  memset(x, 0, sizeof x);
  memset(y, 0, sizeof y);
  for (int i = 0; i < (lim >> 1); i++) x[i] = a[i], y[i] = b[i];
  NTT(x, 1), NTT(y, 1);
  for (int i = 0; i < lim; i++) x[i] = x[i] * y[i] % P;
  NTT(x, -1);
  for (int i = 0; i < lim; i++) a[i] = x[i];
}
static long long c[2][1000];
void Inv(long long *a, int n) {
  int p = 0;
  memset(c, 0, sizeof c);
  c[0][0] = qpow(a[0], P - 2);
  lim = 2, bit = 1;
  while (lim <= (n << 1)) {
    lim <<= 1, bit++;
    calrev();
    p ^= 1;
    memset(c[p], 0, sizeof c[p]);
    for (int i = 0; i <= lim; i++) c[p][i] = add(c[p ^ 1][i], c[p ^ 1][i]);
    mul(c[p ^ 1], c[p ^ 1]);
    mul(c[p ^ 1], a);
    for (int i = 0; i <= lim; i++) c[p][i] = add(c[p][i], P - c[p ^ 1][i]);
  }
  for (int i = 0; i < lim; i++) a[i] = c[p][i];
}
}  // namespace Polynomial
using namespace Polynomial;
inline char fgc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline long long readint() {
  register long long res = 0, neg = 1;
  char c = fgc();
  while (c < '0' || c > '9') {
    if (c == '-') neg = -1;
    c = fgc();
  }
  while (c >= '0' && c <= '9') {
    res = res * 10 + c - '0';
    c = fgc();
  }
  return res * neg;
}
int exgcd(int a, int b, int &x, int &y) {
  if (!b) {
    x = 1;
    y = 0;
    return a;
  }
  int r = exgcd(b, a % b, y, x);
  y -= a / b * x;
}
long long phi(long long n) {
  int ans = n, temp = n, i;
  for (i = 2; i * i <= temp; i++) {
    if (temp % i == 0) {
      ans -= ans / i;
      while (temp % i == 0) temp /= i;
    }
  }
  if (temp > 1) ans -= ans / temp;
  return ans;
}
struct vec {
  double x, y;
  vec(double X = 0, double Y = 0) : x(X), y(Y) {}
  vec operator+(const vec &a) const { return vec(x + a.x, y + a.y); }
  vec operator-(const vec &a) const { return vec(x - a.x, y - a.y); }
  void operator+=(const vec &a) { this->x += a.x, this->y += a.y; }
  void operator-=(const vec &a) { this->x -= a.x, this->y -= a.y; }
  vec operator*(const double &a) const { return vec(x * a, y * a); }
  vec operator/(const double &a) const { return vec(x / a, y / a); }
  void operator*=(const double &a) { this->x *= a, this->y *= a; }
  void operator/=(const double &a) { this->x /= a, this->y /= a; }
};
struct Trie {
  int next[500010][26], fail[500010], end[500010];
  int root, L;
  int newnode() {
    for (int i = 0; i < 26; i++) next[L][i] = -1;
    end[L++] = 0;
    return L - 1;
  }
  void init() {
    L = 0;
    root = newnode();
  }
  void insert(char buf[]) {
    int len = (int)strlen(buf);
    int now = root;
    for (int i = 0; i < len; i++) {
      if (next[now][buf[i] - 'a'] == -1) {
        next[now][buf[i] - 'a'] = newnode();
      }
      now = next[now][buf[i] - 'a'];
    }
    end[now]++;
  }
  void build() {
    queue<int> Q;
    fail[root] = root;
    for (int i = 0; i < 26; i++) {
      if (next[root][i] == -1) {
        next[root][i] = root;
      } else {
        fail[next[root][i]] = root;
        Q.push(next[root][i]);
      }
    }
    while (!Q.empty()) {
      int now = Q.front();
      Q.pop();
      for (int i = 0; i < 26; i++) {
        if (next[now][i] == -1)
          next[now][i] = next[fail[now]][i];
        else {
          fail[next[now][i]] = next[fail[now]][i];
          Q.push(next[now][i]);
        }
      }
    }
  }
  int query(char buf[]) {
    int len = (int)strlen(buf);
    int now = root;
    int res = 0;
    for (int i = 0; i < len; i++) {
      now = next[now][buf[i] - 'a'];
      int temp = now;
      while (temp != root) {
        res += end[temp];
        end[temp] = 0;
        temp = fail[temp];
      }
    }
    return res;
  }
};
char buf[1000010];
Trie ac;
struct NOODD {
  double x;
  double y;
  NOODD(double a, double b) { x = a, y = b; }
  NOODD() {}
};
NOODD operator+(NOODD A, NOODD B) { return NOODD(A.x + B.x, A.y + B.y); }
NOODD operator*(NOODD A, double p) { return NOODD(A.x * p, A.y * p); }
NOODD operator/(NOODD A, double p) { return NOODD(A.x / p, A.y * p); }
double Dot(NOODD A, NOODD B) { return A.x * B.x + A.y * B.y; }
double Length(NOODD A) { return sqrt(Dot(A, A)); }
double Angle(NOODD A, NOODD B) {
  return acos(Dot(A, B) / Length(A) / Length(B));
}
double Cross(NOODD A, NOODD B) { return A.x * B.y - A.y * B.x; }
NOODD Rotate(NOODD A, double rad) {
  return NOODD(A.x * cos(rad) - A.y * sin(rad),
               A.x * sin(rad) + A.y * cos(rad));
}
void extend_Euclid(int a, int b, int &x, int &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return;
  }
  extend_Euclid(b, a % b, x, y);
  int tmp = x;
  x = y;
  y = tmp - (a / b) * y;
}
int CRT(int a[], int m[], int n) {
  int M = 1;
  int ans = 0;
  for (int i = 1; i <= n; i++) M *= m[i];
  for (int i = 1; i <= n; i++) {
    int x, y;
    int Mi = M / m[i];
    extend_Euclid(Mi, m[i], x, y);
    ans = (ans + Mi * x * a[i]) % M;
  }
  if (ans < 0) ans += M;
  return ans;
}
const int N = 5e5 + 10;
using namespace std;
const int maxn = 3005;
const int maxm = 26;
const int mod = 1e9 + 7;
int n, k;
char s[maxn];
int cnt = 0;
int sum = 0;
vector<int> v[maxn * maxn];
void solve_D() {
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  while (1) {
    bool flag = 0;
    for (int j = 1; j <= n - 1; j++)
      if (s[j] == 'R' && s[j + 1] == 'L') flag = 1, v[cnt].push_back(j);
    if (flag) {
      for (auto x : v[cnt]) swap(s[x], s[x + 1]);
      sum += v[cnt].size();
      cnt++;
      if (sum > n * n) {
        puts("-1");
        return;
      }
    } else
      break;
  }
  if (!(cnt <= k && k <= sum)) {
    puts("-1");
    return;
  }
  for (int i = 0; i <= cnt - 1; i++) {
    int siz = (v[i].size());
    int now = -1;
    for (int j = 0; j <= siz - 1; j++) {
      if (k > cnt - i) {
        printf("1 %d\n", v[i][j]);
        k--;
      } else {
        now = j;
        break;
      }
    }
    if (now == -1) continue;
    printf("%d ", siz - now);
    for (int j = now; j <= siz - 1; j++) printf("%d ", v[i][j]);
    puts(""), k--;
  }
}
int a[N], mi[N], ma[N], vis[N];
void solve_F() {
  int n;
  cin >> n;
  int cnt = 0;
  for (int i = 2; i <= n; i++) {
    if (!vis[i]) a[++cnt] = i, mi[i] = i;
    for (int j = 1; j <= cnt && i * a[j] <= n; j++) {
      vis[i * a[j]] = 1;
      mi[i * a[j]] = a[j];
      if (i % a[j] == 0) break;
    }
  }
  ma[1] = 1;
  for (int i = 2; i <= n; i++) ma[i] = i / mi[i];
  sort(ma + 1, ma + n + 1);
  for (int i = 2; i <= n; i++) cout << ma[i] << " ";
  cout << '\n';
}
void solve_C() {
  map<long long, long long> vis;
  long long n, now = 0, ans = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  vis[0] = 0;
  for (int i = 1; i <= n; i++) {
    sum += a[i];
    if (vis.count(sum)) now = max(now, vis[sum] + 1);
    vis[sum] = i;
    ans += i - now;
  }
  cout << ans << '\n';
}
int b[N];
struct Appear {
  bool v[3];
} boo[N];
void solve_B() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    boo[i] = boo[i - 1];
    boo[i].v[a[i - 1] + 1] = 1;
  }
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = n; i >= 1; i--) {
    if (a[i] < b[i]) {
      if (!boo[i].v[2]) {
        printf("NO\n");
        return;
      }
    }
    if (a[i] > b[i]) {
      if (!boo[i].v[0]) {
        printf("NO\n");
        return;
      }
    }
  }
  printf("YES\n");
}
void solve_A() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (i == n && j == m)
        break;
      else {
        cout << "B";
        if (j == m) cout << '\n';
      }
    }
  }
  cout << "W" << '\n';
}
int main() {
  int t;
  cin >> t;
  while (t--) solve_A();
  return 0;
}

### Prompt

Generate a cpp solution to the following problem:

Young boy Artem tries to paint a picture, and he asks his mother Medina to help him. Medina is very busy, that's why she asked for your help.

Artem wants to paint an n × m board. Each cell of the board should be colored in white or black. 

Lets B be the number of black cells that have at least one white neighbor adjacent by the side. Let W be the number of white cells that have at least one black neighbor adjacent by the side. A coloring is called good if B = W + 1. 

The first coloring shown below has B=5 and W=4 (all cells have at least one neighbor with the opposite color). However, the second coloring is not good as it has B=4, W=4 (only the bottom right cell doesn't have a neighbor with the opposite color).

<image>

Please, help Medina to find any good coloring. It's guaranteed that under given constraints the solution always exists. If there are several solutions, output any of them.

Input

Each test contains multiple test cases. 

The first line contains the number of test cases t (1 ≤ t ≤ 20). Each of the next t lines contains two integers n, m (2 ≤ n,m ≤ 100) — the number of rows and the number of columns in the grid.

Output

For each test case print n lines, each of length m, where i-th line is the i-th row of your colored matrix (cell labeled with 'B' means that the cell is black, and 'W' means white). Do not use quotes.

It's guaranteed that under given constraints the solution always exists.

Example

Input


2
3 2
3 3


Output


BW
WB
BB
BWB
BWW
BWB

Note

In the first testcase, B=3, W=2.

In the second testcase, B=5, W=4. You can see the coloring in the statement.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long long INF(0x3f3f3f3f3f3f3f3fll);
const int inf(0x3f3f3f3f);
namespace Polynomial {
const long long P = 998244353, g = 3, gi = 332748118;
static int rev[1000];
int lim, bit;
long long add(long long a, long long b) { return (a += b) >= P ? a - P : a; }
long long qpow(long long a, long long b) {
  long long prod = 1;
  while (b) {
    if (b & 1) prod = prod * a % P;
    a = a * a % P;
    b >>= 1;
  }
  return (prod + P) % P;
}
void calrev() {
  for (int i = 1; i < lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (bit - 1));
}
void NTT(long long *A, int inv) {
  for (int i = 0; i < lim; i++)
    if (i < rev[i]) swap(A[i], A[rev[i]]);
  for (int mid = 1; mid < lim; mid <<= 1) {
    long long tmp = qpow(inv == 1 ? g : gi, (P - 1) / (mid << 1));
    for (int j = 0; j < lim; j += (mid << 1)) {
      long long omega = 1;
      for (int k = 0; k < mid; k++, omega = (omega * tmp) % P) {
        int x = A[j + k], y = omega * A[j + k + mid] % P;
        A[j + k] = (x + y) % P;
        A[j + k + mid] = (x - y + P) % P;
      }
    }
  }
  if (inv == 1) return;
  int invn = qpow(lim, P - 2);
  for (int i = 0; i < lim; i++) A[i] = A[i] * invn % P;
}
static long long x[1000], y[1000];
void mul(long long *a, long long *b) {
  memset(x, 0, sizeof x);
  memset(y, 0, sizeof y);
  for (int i = 0; i < (lim >> 1); i++) x[i] = a[i], y[i] = b[i];
  NTT(x, 1), NTT(y, 1);
  for (int i = 0; i < lim; i++) x[i] = x[i] * y[i] % P;
  NTT(x, -1);
  for (int i = 0; i < lim; i++) a[i] = x[i];
}
static long long c[2][1000];
void Inv(long long *a, int n) {
  int p = 0;
  memset(c, 0, sizeof c);
  c[0][0] = qpow(a[0], P - 2);
  lim = 2, bit = 1;
  while (lim <= (n << 1)) {
    lim <<= 1, bit++;
    calrev();
    p ^= 1;
    memset(c[p], 0, sizeof c[p]);
    for (int i = 0; i <= lim; i++) c[p][i] = add(c[p ^ 1][i], c[p ^ 1][i]);
    mul(c[p ^ 1], c[p ^ 1]);
    mul(c[p ^ 1], a);
    for (int i = 0; i <= lim; i++) c[p][i] = add(c[p][i], P - c[p ^ 1][i]);
  }
  for (int i = 0; i < lim; i++) a[i] = c[p][i];
}
}  // namespace Polynomial
using namespace Polynomial;
inline char fgc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline long long readint() {
  register long long res = 0, neg = 1;
  char c = fgc();
  while (c < '0' || c > '9') {
    if (c == '-') neg = -1;
    c = fgc();
  }
  while (c >= '0' && c <= '9') {
    res = res * 10 + c - '0';
    c = fgc();
  }
  return res * neg;
}
int exgcd(int a, int b, int &x, int &y) {
  if (!b) {
    x = 1;
    y = 0;
    return a;
  }
  int r = exgcd(b, a % b, y, x);
  y -= a / b * x;
}
long long phi(long long n) {
  int ans = n, temp = n, i;
  for (i = 2; i * i <= temp; i++) {
    if (temp % i == 0) {
      ans -= ans / i;
      while (temp % i == 0) temp /= i;
    }
  }
  if (temp > 1) ans -= ans / temp;
  return ans;
}
struct vec {
  double x, y;
  vec(double X = 0, double Y = 0) : x(X), y(Y) {}
  vec operator+(const vec &a) const { return vec(x + a.x, y + a.y); }
  vec operator-(const vec &a) const { return vec(x - a.x, y - a.y); }
  void operator+=(const vec &a) { this->x += a.x, this->y += a.y; }
  void operator-=(const vec &a) { this->x -= a.x, this->y -= a.y; }
  vec operator*(const double &a) const { return vec(x * a, y * a); }
  vec operator/(const double &a) const { return vec(x / a, y / a); }
  void operator*=(const double &a) { this->x *= a, this->y *= a; }
  void operator/=(const double &a) { this->x /= a, this->y /= a; }
};
struct Trie {
  int next[500010][26], fail[500010], end[500010];
  int root, L;
  int newnode() {
    for (int i = 0; i < 26; i++) next[L][i] = -1;
    end[L++] = 0;
    return L - 1;
  }
  void init() {
    L = 0;
    root = newnode();
  }
  void insert(char buf[]) {
    int len = (int)strlen(buf);
    int now = root;
    for (int i = 0; i < len; i++) {
      if (next[now][buf[i] - 'a'] == -1) {
        next[now][buf[i] - 'a'] = newnode();
      }
      now = next[now][buf[i] - 'a'];
    }
    end[now]++;
  }
  void build() {
    queue<int> Q;
    fail[root] = root;
    for (int i = 0; i < 26; i++) {
      if (next[root][i] == -1) {
        next[root][i] = root;
      } else {
        fail[next[root][i]] = root;
        Q.push(next[root][i]);
      }
    }
    while (!Q.empty()) {
      int now = Q.front();
      Q.pop();
      for (int i = 0; i < 26; i++) {
        if (next[now][i] == -1)
          next[now][i] = next[fail[now]][i];
        else {
          fail[next[now][i]] = next[fail[now]][i];
          Q.push(next[now][i]);
        }
      }
    }
  }
  int query(char buf[]) {
    int len = (int)strlen(buf);
    int now = root;
    int res = 0;
    for (int i = 0; i < len; i++) {
      now = next[now][buf[i] - 'a'];
      int temp = now;
      while (temp != root) {
        res += end[temp];
        end[temp] = 0;
        temp = fail[temp];
      }
    }
    return res;
  }
};
char buf[1000010];
Trie ac;
struct NOODD {
  double x;
  double y;
  NOODD(double a, double b) { x = a, y = b; }
  NOODD() {}
};
NOODD operator+(NOODD A, NOODD B) { return NOODD(A.x + B.x, A.y + B.y); }
NOODD operator*(NOODD A, double p) { return NOODD(A.x * p, A.y * p); }
NOODD operator/(NOODD A, double p) { return NOODD(A.x / p, A.y * p); }
double Dot(NOODD A, NOODD B) { return A.x * B.x + A.y * B.y; }
double Length(NOODD A) { return sqrt(Dot(A, A)); }
double Angle(NOODD A, NOODD B) {
  return acos(Dot(A, B) / Length(A) / Length(B));
}
double Cross(NOODD A, NOODD B) { return A.x * B.y - A.y * B.x; }
NOODD Rotate(NOODD A, double rad) {
  return NOODD(A.x * cos(rad) - A.y * sin(rad),
               A.x * sin(rad) + A.y * cos(rad));
}
void extend_Euclid(int a, int b, int &x, int &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return;
  }
  extend_Euclid(b, a % b, x, y);
  int tmp = x;
  x = y;
  y = tmp - (a / b) * y;
}
int CRT(int a[], int m[], int n) {
  int M = 1;
  int ans = 0;
  for (int i = 1; i <= n; i++) M *= m[i];
  for (int i = 1; i <= n; i++) {
    int x, y;
    int Mi = M / m[i];
    extend_Euclid(Mi, m[i], x, y);
    ans = (ans + Mi * x * a[i]) % M;
  }
  if (ans < 0) ans += M;
  return ans;
}
const int N = 5e5 + 10;
using namespace std;
const int maxn = 3005;
const int maxm = 26;
const int mod = 1e9 + 7;
int n, k;
char s[maxn];
int cnt = 0;
int sum = 0;
vector<int> v[maxn * maxn];
void solve_D() {
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  while (1) {
    bool flag = 0;
    for (int j = 1; j <= n - 1; j++)
      if (s[j] == 'R' && s[j + 1] == 'L') flag = 1, v[cnt].push_back(j);
    if (flag) {
      for (auto x : v[cnt]) swap(s[x], s[x + 1]);
      sum += v[cnt].size();
      cnt++;
      if (sum > n * n) {
        puts("-1");
        return;
      }
    } else
      break;
  }
  if (!(cnt <= k && k <= sum)) {
    puts("-1");
    return;
  }
  for (int i = 0; i <= cnt - 1; i++) {
    int siz = (v[i].size());
    int now = -1;
    for (int j = 0; j <= siz - 1; j++) {
      if (k > cnt - i) {
        printf("1 %d\n", v[i][j]);
        k--;
      } else {
        now = j;
        break;
      }
    }
    if (now == -1) continue;
    printf("%d ", siz - now);
    for (int j = now; j <= siz - 1; j++) printf("%d ", v[i][j]);
    puts(""), k--;
  }
}
int a[N], mi[N], ma[N], vis[N];
void solve_F() {
  int n;
  cin >> n;
  int cnt = 0;
  for (int i = 2; i <= n; i++) {
    if (!vis[i]) a[++cnt] = i, mi[i] = i;
    for (int j = 1; j <= cnt && i * a[j] <= n; j++) {
      vis[i * a[j]] = 1;
      mi[i * a[j]] = a[j];
      if (i % a[j] == 0) break;
    }
  }
  ma[1] = 1;
  for (int i = 2; i <= n; i++) ma[i] = i / mi[i];
  sort(ma + 1, ma + n + 1);
  for (int i = 2; i <= n; i++) cout << ma[i] << " ";
  cout << '\n';
}
void solve_C() {
  map<long long, long long> vis;
  long long n, now = 0, ans = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  vis[0] = 0;
  for (int i = 1; i <= n; i++) {
    sum += a[i];
    if (vis.count(sum)) now = max(now, vis[sum] + 1);
    vis[sum] = i;
    ans += i - now;
  }
  cout << ans << '\n';
}
int b[N];
struct Appear {
  bool v[3];
} boo[N];
void solve_B() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    boo[i] = boo[i - 1];
    boo[i].v[a[i - 1] + 1] = 1;
  }
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = n; i >= 1; i--) {
    if (a[i] < b[i]) {
      if (!boo[i].v[2]) {
        printf("NO\n");
        return;
      }
    }
    if (a[i] > b[i]) {
      if (!boo[i].v[0]) {
        printf("NO\n");
        return;
      }
    }
  }
  printf("YES\n");
}
void solve_A() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (i == n && j == m)
        break;
      else {
        cout << "B";
        if (j == m) cout << '\n';
      }
    }
  }
  cout << "W" << '\n';
}
int main() {
  int t;
  cin >> t;
  while (t--) solve_A();
  return 0;
}

```