#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <bitset>
#include <list>

using namespace std;

using ll = long long;
using ld = long double;

int n;
vector<int> cnt, a;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(nullptr); cout.tie(nullptr);

    cin >> n;
    cnt.resize(n + 1);
    a.resize(n);

    for (int i = 0; i < n; ++i) {
        cin >> a[i];
        a[i] = n - a[i];
        cnt[a[i]]++;
    }

    for (int i = 0; i < n; ++i) {
        if (!(cnt[i] == i || cnt[i] == 0)) {
            cout << "Impossible";
            return 0;
        }
    }

    cout << "Possible\n";
    for (int i = 0; i < n; ++i)
        cout << a[i] << ' ';

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{

   int t;
   cin >> t;
   while(t--)
   {
      int n,m;
      cin >> n >> m;
      for(int i = 0; i < n; i++)
      {
         for(int j = 0; j < m; j++)
         {
            if(!i && !j)
               cout << 'W';
            else
               cout << 'B';
         }
         cout << endl;
      }
   }
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	int t;
	cin >> t;
	while(t --) {
		int n, m;
		cin >> n >> m;
		char g[n][m];
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				if((i + j) % 2 == 0) g[i][j] = 'W';
				else g[i][j] = 'B';
			}
		}
		if((n * m) % 2 == 0) g[n - 1][m - 1] = 'B';
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				cout << g[i][j];
			}
			cout << "\n";
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	int t;
	cin >> t;
	while(t --) {
		int n, m;
		cin >> n >> m;
		char g[n][m];
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				if((i + j) % 2 == 0) g[i][j] = 'B';
				else g[i][j] = 'W';
			}
		}
		if((n * m) % 2 == 0) g[0][0] = 'W';
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				cout << g[i][j];
			}
			cout << "\n";
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	int t;
	cin >> t;
	while(t --) {
		int n, m;
		cin >> n >> m;
		char g[n][m];
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				if((i + j) % 2 == 0) g[i][j] = 'W';
				else g[i][j] = 'B';
			}
		}
		if((n * m) % 2 == 0) g[0][0] = 'B';
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				cout << g[i][j];
			}
			cout << "\n";
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	int t;
	cin >> t;
	while(t --) {
		int n, m;
		cin >> n >> m;
		char g[n][m];
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				if((i + j) % 2 == 0) g[i][j] = 'W';
				else g[i][j] = 'B';
			}
		}
		if((n * m) % 2 == 0) {
		    g[0][0] = 'B';
		}
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				cout << g[i][j];
			}
			cout << "\n";
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	int t;
	cin >> t;
	while(t --) {
		int n, m;
		cin >> n >> m;
		char g[n][m];
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				if((i + j) % 2 == 0) g[i][j] = 'B';
				else g[i][j] = 'W';
			}
		}
		if((n * m) % 2 == 0) g[n - 1][m - 1] = 'B';
		else {
		    for(int i = 0; i < n; i ++) {
		        for(int j = 0; j < m; j ++) {
		            if(g[i][j] == 'B') g[i][j] = 'W';
		            else g[i][j] = 'B';
		        }
		    }
		}
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				cout << g[i][j];
			}
			cout << "\n";
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	int t;
	cin >> t;
	while(t --) {
		int n, m;
		cin >> n >> m;
		char g[n][m];
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				if((i + j) % 2 == 0) g[i][j] = 'B';
				else g[i][j] = 'W';
			}
		}
		if((n * m) % 2 == 0) g[0][0] = 'B';
		else {
		    for(int i = 0; i < n; i ++) {
		        for(int j = 0; j < m; j ++) {
		            if(g[i][j] == 'B') g[i][j] = 'W';
		            else g[i][j] = 'B';
		        }
		    }
		}
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				cout << g[i][j];
			}
			cout << "\n";
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	int t;
	cin >> t;
	while(t --) {
		int n, m;
		cin >> n >> m;
		char g[n][m];
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				if((i + j) % 2 == 0) g[i][j] = 'W';
				else g[i][j] = 'B';
			}
		}
		if((n * m) % 2 == 0) g[0][0] = 'B';
		else
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				cout << g[i][j];
			}
			cout << "\n";
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	int t;
	cin >> t;
	while(t --) {
		int n, m;
		cin >> n >> m;
		char g[n][m];
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				if((i + j) % 2 == 0) g[i][j] = 'W';
				else g[i][j] = 'B';
			}
		}
		if((n * m) % 2 == 0) g[0][0] = 'B';
		else {
		    for(int i = 0; i < n; i ++) {
		        for(int j = 0; j < m; j ++) {
		            if(g[i][j] == 'B') g[i][j] = 'W';
		            else g[i][j] = 'B';
		        }
		    }
		}
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				cout << g[i][j];
			}
			cout << "\n";
		}
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
	int t;
	cin >> t;
	while(t --) {
		int n, m;
		cin >> n >> m;
		char g[n][m];
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				if((i + j) % 2 == 0) g[i][j] = 'B';
				else g[i][j] = 'W';
			}
		}
		if((n * m) % 2 == 0) g[n - 1][m - 1] = 'B';
		for(int i = 0; i < n; i ++) {
			for(int j = 0; j < m; j ++) {
				cout << g[i][j];
			}
			cout << "\n";
		}
	}
	return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,m;
        cin>>n>>m;

        int prod=n*m;
        int b=(prod/2)+1;
        int w=prod-b;
        while(b>w+1)
            w++;
        //cout<<b<<w;
        for(int i=0;i<n;i++)
        {
            int cnt=m;
            while(cnt--)
            {
                if(b<=w+1)
                {
                    cout<<"W";
                    w--;
                }
                else{
                    cout<<"B";
                    b--;
                }

            }
            cout<<endl;

        }

    }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,m;
        cin>>n>>m;

        int prod=n*m;
        int b=(prod/2)+1;
        int w=prod-b;

        cout<<b<<w;
        for(int i=0;i<n;i++)
        {
            int cnt=m;
            while(cnt--)
            {
                if(b<w+1)
                {
                    cout<<"W";
                    w--;
                }
                else{
                    cout<<"B";
                    b--;
                }

            }
            cout<<endl;

        }

    }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,m;
        cin>>n>>m;

        int prod=n*m;
        int w=1;
        prod--;

        //cout<<b<<w;
        for(int i=0;i<n;i++)
        {
            int cnt=m;
            while(cnt--)
            {
                if(w)
                {
                    cout<<"W";
                    w--;
                }
                else{
                    cout<<"B";
                    prod--;
                }

            }
            cout<<endl;

        }

    }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,m;
        cin>>n>>m;

        int prod=n*m;
        int b=(prod/2)+1;
        int w=prod-b;
        if(w>1)
        {
            w--;
            b++;
        }

        //cout<<b<<w;
        for(int i=0;i<n;i++)
        {
            int cnt=m;
            while(cnt--)
            {
                if(b<w+1)
                {
                    cout<<"W";
                    w--;
                }
                else{
                    cout<<"B";
                    b--;
                }

            }
            cout<<endl;

        }

    }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,m;
        cin>>n>>m;

        int prod=n*m;
        int b=(prod/2)+1;
        int w=prod-b;
        //cout<<b<<w;
        for(int i=0;i<n;i++)
        {
            int cnt=m;
            while(cnt--)
            {
                if(b<w+1)
                {
                    cout<<"W";
                    w--;
                }
                else{
                    cout<<"B";
                    b--;
                }

            }
            cout<<endl;

        }

    }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,m;
        cin>>n>>m;

        int prod=n*m;
        int b=(prod/2)+1;
        int w=prod-b;

        //cout<<b<<w;
        for(int i=0;i<n;i++)
        {
            int cnt=m;
            while(cnt--)
            {
                if(b<w+1)
                {
                    cout<<"W";
                    w--;
                }
                else{
                    cout<<"B";
                    b--;
                }

            }
            cout<<endl;

        }

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main(){
               int t;
               cin>>t;
               for(int i=0;i<t;i++){
                              int n,m;
                              cin>>n>>m;

               for(int i=0;i<n;i++){
                              for(int h=0;h<m;h++){
                                             if(i==0&&h==0){
                                                            cout<<"W";
                                             }
                                             cout<<"B";
                              }
                              cout<<endl;
               }
               cout<<endl;
               }
}


#include<bits/stdc++.h>
using namespace srd;
int main(){
               int t;
               cin>>t;
               for(int i=0;i<t;i++){
                              int n,m;
                              cin>>n>>m;
                              cout<<"W";
               for(int i=1;i<m;m++){
                              cout<<"B";
               }
               cout<<endl;
               for(int i=1;i<n;i++){
                              for(int h=0;h<m;h++){
                                             cout<<"B";
                              }
                              cout<<endl;
               }
               cout<<endl;
               }
}


#include<bits/stdc++.h>
using namespace srd;
int main(){
               int t;
               cin>>t;
               for(int i=0;i<t;i++){
                              int n,m;
                              cin>>n>>m;

               for(int i=0;i<n;i++){
                              for(int h=0;h<m;h++){
                                             if(i==0&&h==0){
                                                            cout<<"W";
                                             }
                                             cout<<"B";
                              }
                              cout<<endl;
               }
               cout<<endl;
               }
}


#include<bits/stdc++.h>
using namespace std;
int main(){
               int t;
               cin>>t;
               for(int i=0;i<t;i++){
                              int n,m;
                              cin>>n>>m;

               for(int i=0;i<n;i++){
                              for(int h=0;h<m;h++){
                                             if(i==0&&h==0){
                                                            cout<<"W";
                                                            continue;
                                             }

                                             cout<<"B";
                              }
                              cout<<endl;
               }
               cout<<endl;
               }
}


#include<bits/stdc++.h>
using namespace std;
int main(){
               int t;
               cin>>t;
               for(int i=0;i<t;i++){
                              int n,m;
                              cin>>n>>m;

               for(int i=0;i<n;i++){
                              for(int h=0;h<m;h++){
                                             if(i==0&&h==0){
                                                            cout<<"W";
                                             }
                                             cout<<"B";
                              }
                              cout<<endl;
               }
               //cout<<endl;
               }
}


#include<bits/stdc++.h>
using namespace std;
int main(){
               int t;
               cin>>t;
               for(int i=0;i<t;i++){
                              int n,m;
                              cin>>n>>m;

               for(int i=0;i<n;i++){
                              for(int h=0;h<m;h++){
                                             if(i==0&&h==0){
                                                            cout<<"W";
                                                            continue;
                                             }
                                             cout<<"B";
                              }
                              cout<<endl;
               }
              // cout<<endl;
               }
}


#include<bits/stdc++.h>
using namespace std;
int main(){
               int t;
               cin>>t;
               for(int i=0;i<t;i++){
                              int n,m;
                              cin>>n>>m;
                              cout<<"W";
               for(int i=1;i<m;m++){
                              cout<<"B";
               }
               cout<<endl;
               for(int i=1;i<n;i++){
                              for(int h=0;h<m;h++){
                                             cout<<"B";
                              }
                              cout<<endl;
               }
               cout<<endl;
               }
}


#include<bits/stdc++.h>
using namespace std;
int main(){
               int t;
               cin>>t;
               for(int i=0;i<t;i++){
                              int n,m;
                              cin>>n>>m;

               for(int i=0;i<n;i++){
                              for(int h=0;h<m;h++){
                                             if(i==0&&h==0){
                                                            cout<<"W";
                                                            continue;
                                             }
                                             cout<<"B";
                              }
                              cout<<endl;
               }
               cout<<endl;
               }
}


#include<bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pb push_back
#define popb pop_back
using namespace std;
ll mod=1000000007;

int main(){
    ll t;cin>>t;
    while(t--){
    	int n,m;cin>>n>>m;
    	for(int i=0;i<n;i++){
    		for(int j=0;j<m;j++){
    			if(i%2==0){
    				cout<<"B";
    			}
    			else{
    				cout<<"W";
    			}
    		}
    		cout<<endl;
    	}
//    	cout<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pb push_back
#define popb pop_back
using namespace std;
ll mod=1000000007;

int main(){
    ll t;cin>>t;
    while(t--){
    	int n,m;cin>>n>>m;
    	for(int i=0;i<n;i++){
    		for(int j=0;j<m;j++){
    			if(i%2==0){
    				cout<<"B"<<" ";
    			}
    			else{
    				cout<<"W"<<" ";
    			}
    		}
    		cout<<endl;
    	}
    	//cout<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pb push_back
#define popb pop_back
using namespace std;
ll mod=1000000007;

int main(){
    ll t;cin>>t;
    while(t--){
    	int n,m;cin>>n>>m;
    	int tot=n*m;
    	int b=tot/2;
    	int w=tot/2;
    	if(tot%2!=0){
    		b++;
    	}
    	else{
    		b+=1;
    		w-=1;
    	}
    	//cout<<b<<" "<<w<<endl;
    	for(int i=0;i<n;i++){
    		int j=0;
    		while(j<m){
    			if(j%2!=0){
    				if(w>0){
    			    	cout<<"W";w--;
    			    }
    			    else{
    			    	cout<<"B";b--;
    				}
    			}
    			else{
    				if(b>0){
    			    	cout<<"B";b--;
    			    }
    			    else{
    			    	cout<<"W";w--;
    				}
    			}
    			j++;
    		}
    		cout<<endl;
    	}
    	//cout<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pb push_back
#define popb pop_back
using namespace std;
ll mod=1000000007;

int main(){
    ll t;cin>>t;
    while(t--){
    	int n,m;cin>>n>>m;
    	for(int i=0;i<n;i++){
    		for(int j=0;j<m;j++){
    			if(i==0 && j==0){
    				cout<<"W";
    			}
    			else{
    				cout<<"B";
    			}
    		}
    		cout<<endl;
    	}

    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pb push_back
#define popb pop_back
using namespace std;
ll mod=1000000007;

int main(){
    ll t;cin>>t;
    while(t--){
    	int n,m;cin>>n>>m;
    	int tot=n*m;
    	int b=tot/2;
    	int w=tot/2;
    	if(tot%2!=0){
    		b++;
    	}
    	else{
    		b++;
    		w--;
    	}
    	//cout<<b<<" "<<w<<endl;
    	for(int i=0;i<n;i++){
    		int j=0;
    		while(j<m){
    			if(j%2!=0){
    				if(w>0){
    			    	cout<<"W";w--;
    			    }
    			    else if(b>0){
    			    	cout<<"B";b--;
    				}
    			}
    			else{
    				if(b>0){
    			    	cout<<"B";b--;
    			    }
    			    else if(w>0){
    			    	cout<<"W";w--;
    				}
    			}
    			j++;
    		}
    		cout<<endl;
    	}
    	//cout<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pb push_back
#define popb pop_back
using namespace std;
ll mod=1000000007;

int main(){
    ll t;cin>>t;
    while(t--){
    	int n,m;cin>>n>>m;
    	int tot=n*m;
    	int b=tot/2;
    	int w=tot/2;
    	if(tot%2!=0){
    		b++;
    	}
    	else{
    		b+=1;
    		w-=1;
    	}
    	cout<<b<<" "<<w<<endl;
    	for(int i=0;i<n;i++){
    		int j=0;
    		while(j<m){
    			if(j%2!=0){
    				if(w>0){
    			    	cout<<"W";w--;
    			    }
    			    else{
    			    	cout<<"B";b--;
    				}
    			}
    			else{
    				if(b>0){
    			    	cout<<"B";b--;
    			    }
    			    else{
    			    	cout<<"W";w--;
    				}
    			}
    			j++;
    		}
    		cout<<endl;
    	}
    	//cout<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long

void solve()
{
    int r, c;
    cin >> r >> c;
    bool a = true;
    int b = 0, w = 0;
    for (int i = 0; i < r; i++)
    {
        for (int j = 0; j < c; j++)
        {
            if (i == r - 1 && j == c - 1)
            {
                if (b <= w)
                {
                    cout << "B";
                }
                else
                {
                    cout << "W";
                }
            }
            else
            {
                if (a)
                {
                    cout << "B";
                    b++;
                }
                else
                {
                    cout << "W";
                    w++;
                }
            }
            a = !a;
        }
        cout << endl;
    }
}

int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

void solve() {
    int n, m; cin >> n >> m;
    string black_row(m, 'B');
    vector<string> result(n, black_row);
    result[0][0] = 'W';
    for (int i = 0; i < n; ++i) {
        cout << result[i] << '\n';
    }
}

int main() {
    int t; cin >> t;
    while(t--) solve();
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long

void solve()
{
    int r, c;
    cin >> r >> c;
    bool a = true;
    int b = 0, w = 0;
    for (int i = 0; i < r; i++)
    {
        for (int j = 0; j < c; j++)
        {
            if (i == r - 1 && j == c - 1)
            {
                if (b <= w+1)
                {
                    cout << "B";
                }
                else
                {
                    cout << "W";
                }
            }
            else
            {
                if (a)
                {
                    cout << "B";
                    b++;
                }
                else
                {
                    cout << "W";
                    w++;
                }
            }
            a = !a;
        }
        cout << endl;
    }
}

int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long

void solve()
{
    int r, c;
    cin >> r >> c;
    bool a = true;
    int b = 0, w = 0;
    for (int i = 0; i < r; i++)
    {
        for (int j = 0; j < c; j++)
        {
            if (i == r - 1 && j == c - 1)
            {
                if (!a)
                {
                    cout << "B";
                }
                else if (b == w)
                {
                    cout << "B";
                }
                else
                {
                    cout << "W";
                }
            }
            else
            {
                if (a)
                {
                    cout << "B";
                    b++;
                }
                else
                {
                    cout << "W";
                    w++;
                }
            }
            a = !a;
        }
        cout << endl;
    }
}

int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long

void solve()
{
    int r, c;
    cin >> r >> c;
    bool a = true;
    int b = 0, w = 0;
    for (int i = 0; i < r; i++)
    {
        for (int j = 0; j < c; j++)
        {
            if(j==c-1&&i==r-1){
                if(b>w+1){
                    cout<<"W";
                }
                else{
                    cout<<"B";
                }
                break;
            }
            if(a){
                cout<<"B";
                b++;
            }
            else{
                cout<<"W";
                w++;
            }
            a=!a;
        }
        cout << endl;
    }
}

int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long

void solve()
{
    int r, c;
    cin >> r >> c;
    bool a = true;
    int b = 0, w = 0;
    for (int i = 0; i < r; i++)
    {
        for (int j = 0; j < c; j++)
        {
            if ((j + i) & 1)
            {
                if (j == c-1 && i == r-1)
                    cout << "B";
                else
                    cout << "W";
            }
            else
            {
                cout << "B";
            }
        }
        cout << endl;
    }
}

int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}


#define _CRT_SECURE_NO_WARINGS
#include<iostream>
#include<iomanip>
#include<map>
#include<cmath>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<deque>
#include<stack>
#include<bitset>
#include<fstream>
#include<map>
#include<unordered_map>
using namespace std;
typedef int me;
typedef long long ll;
typedef unsigned long long ull;
#define andrew  ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define endl '\n'
#define sz(v)(int)(v.size())
#define all(v) v.begin(),v.end()
#define PI 3.1415926535
#define sin(i) (long double)sin(i*PI/180.0);
#define OO 1e18;
ll gcd(ll x, ll y) { return (y == 0) ? x : gcd(y, x % y); }
ull lcm(ll x, ll y) { return x / gcd(x, y) * y; }
void the_end() {
#ifndef ONLINE_JUDGE;
	system("pause");
#endif
}
int dy8[] = { 0,0,1,-1,1,-1,-1,1 };
int dx8[] = { 1,-1,0,0,1,-1,1,-1 };
int id8[] = { 0, 1,2,3,4, 5,6, 7 };
// you can be specialist
// soon will be (Cyain)
int main()
{
	andrew;
	ll t;
	cin >> t;
	while (t--)
	{
		ll x, y;
		cin >> x >> y;
		ll b = x * y;
		ll w = 1;
		char a[101][101];
		for (int i = 0; i < x; i++)
			for (int j = 0; j < y; j++)
				a[i][j] = 'B';
		int u = 0;
		for (int i = 0; i < x; i++)
		{
			for (int j = 0; j < y; j++)
			{
				if (w + 1 < b) {
					if (j%2 == 0)
					{
						a[i][j] = 'W';
						w++;
						b--;
					}
				}
				else
					break;
			}
			if (w + 1 >= b)
				break;
		}
		for (int i = 0; i < x; i++)
		{
			for (int j = 0; j < y; j++)
				cout << a[i][j];
			cout << endl;
		}
	}

	the_end();
}


#include<bits\stdc++.h>
#define all(x) x.begin(),x.end()
#define PI 3.14159265359
#define endl "\n"
typedef long long ll;
const ll mod = 1000000007;
using namespace std;
void Ali() { std::ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); }
ll gcd(ll a, ll b) { if (b == 0) { return a; } return gcd(b, a % b); }
ll lcm(ll a, ll b) { ll c = a * b; return (c / gcd(a, b)); }
ll fast_power(ll base, ll power) { if (power == 0)return 1; if (power == 1)return base; ll result = fast_power(base, power / 2) % mod; result *= result; result %= mod; if (power % 2)result *= base; return result %= mod; }

int main()
{
    Ali();
    ll t; cin>>t;
    while(t--) {
        ll n,m;
        cin>>n>>m;
        ll s=n*m;
        if(s%2==0) {

        }
        for(int i=0; i<n-1; i++) {
            for(int j=0; j<m; j++) {
                 cout<<"B";
            }
            cout<<endl;

        }
        for(int k=0; k<m; k++) {
            cout<<"W";
        }
        cout<<endl;
    }
}


#define _CRT_SECURE_NO_WARINGS
#include<iostream>
#include<iomanip>
#include<map>
#include<cmath>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<deque>
#include<stack>
#include<bitset>
#include<fstream>
#include<map>
#include<unordered_map>
using namespace std;
typedef int me;
typedef long long ll;
typedef unsigned long long ull;
#define andrew  ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define endl '\n'
#define sz(v)(int)(v.size())
#define all(v) v.begin(),v.end()
#define PI 3.1415926535
#define sin(i) (long double)sin(i*PI/180.0);
#define OO 1e18;
ll gcd(ll x, ll y) { return (y == 0) ? x : gcd(y, x % y); }
ull lcm(ll x, ll y) { return x / gcd(x, y) * y; }
void the_end() {
#ifndef ONLINE_JUDGE;
	system("pause");
#endif
}
int dy8[] = { 0,0,1,-1,1,-1,-1,1 };
int dx8[] = { 1,-1,0,0,1,-1,1,-1 };
int id8[] = { 0, 1,2,3,4, 5,6, 7 };
// you can be specialist
// soon will be (Cyain)
int main()
{
	andrew;
	ll t;
	cin >> t;
	while (t--)
	{
		ll x, y;
		cin >> x >> y;
		ll b = x * y;
		ll w = 1;
		char a[101][101];
		for (int i = 0; i < x; i++)
			for (int j = 0; j < y; j++)
				a[i][j] = 'B';
		int u = 0;
		for (int i = 0; i < x; i++)
		{
			for (int j = 0; j < y; j++)
			{
				if (w + 1 < b) {
					if ((j%2) != (i%2))
					{
						a[i][j] = 'W';
						w++;
						b--;
					}
				}
				else
					break;
			}
			if (w + 1 >= b)
				break;
		}
		for (int i = 0; i < x; i++)
		{
			for (int j = 0; j < y; j++)
				cout << a[i][j];
			cout << endl;
		}
	}

	the_end();
}


#include<bits\stdc++.h>
#define all(x) x.begin(),x.end()
#define PI 3.14159265359
#define endl "\n"
typedef long long ll;
const ll mod = 1000000007;
using namespace std;
void Ali() { std::ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); }
ll gcd(ll a, ll b) { if (b == 0) { return a; } return gcd(b, a % b); }
ll lcm(ll a, ll b) { ll c = a * b; return (c / gcd(a, b)); }
ll fast_power(ll base, ll power) { if (power == 0)return 1; if (power == 1)return base; ll result = fast_power(base, power / 2) % mod; result *= result; result %= mod; if (power % 2)result *= base; return result %= mod; }

int main()
{
    Ali();
    ll t; cin>>t;
    while(t--) {
       ll n,m;
       cin>>n>>m;
       for(int i=0;i<n;i++)
       {
           for(int j=0;j<m;j++)
           {
             if(i==j)cout<<"W";
             else cout<<"B";
           }
           cout<<endl;
       }

    }
}


#define _CRT_SECURE_NO_WARINGS
#include<iostream>
#include<iomanip>
#include<map>
#include<cmath>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<deque>
#include<stack>
#include<bitset>
#include<fstream>
#include<map>
#include<unordered_map>
using namespace std;
typedef int me;
typedef long long ll;
typedef unsigned long long ull;
#define andrew  ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define endl '\n'
#define sz(v)(int)(v.size())
#define all(v) v.begin(),v.end()
#define PI 3.1415926535
#define sin(i) (long double)sin(i*PI/180.0);
#define OO 1e18;
ll gcd(ll x, ll y) { return (y == 0) ? x : gcd(y, x % y); }
ull lcm(ll x, ll y) { return x / gcd(x, y) * y; }
void the_end() {
#ifndef ONLINE_JUDGE;
	system("pause");
#endif
}
int dy8[] = { 0,0,1,-1,1,-1,-1,1 };
int dx8[] = { 1,-1,0,0,1,-1,1,-1 };
int id8[] = { 0, 1,2,3,4, 5,6, 7 };
// you can be specialist
// soon will be (Cyain)
int main()
{
	andrew;
	ll t;
	cin >> t;
	while (t--)
	{
		ll x, y;
		cin >> x >> y;
		ll b = x * y;
		ll w = 1;
		char a[101][101];
		for (int i = 0; i < x; i++)
			for (int j = 0; j < y; j++)
				a[i][j] = 'B';
		int u = 0;
		for (int i = 0; i < x; i++)
		{
			for (int j = 0; j < y; j++)
			{
				if (w + 1 < b) {
					if (u % 2 == 1)
					{
						a[i][j] = 'W';
						w++;
						b--;
					}
				}
				else
					break;
				u++;
			}
			if (w + 1 >= b)
				break;
		}
		for (int i = 0; i < x; i++)
		{
			for (int j = 0; j < y; j++)
				cout << a[i][j];
			cout << endl;
		}
	}

	the_end();
}


#include<bits\stdc++.h>
#define all(x) x.begin(),x.end()
#define PI 3.14159265359
#define endl "\n"
typedef long long ll;
const ll mod = 1000000007;
using namespace std;
void Ali() { std::ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); }
ll gcd(ll a, ll b) { if (b == 0) { return a; } return gcd(b, a % b); }
ll lcm(ll a, ll b) { ll c = a * b; return (c / gcd(a, b)); }
ll fast_power(ll base, ll power) { if (power == 0)return 1; if (power == 1)return base; ll result = fast_power(base, power / 2) % mod; result *= result; result %= mod; if (power % 2)result *= base; return result %= mod; }

int main()
{
    Ali();
    ll t; cin>>t;
    while(t--) {
       ll n,m;
       cin>>n>>m;
       for(int i=0;i<n;i++)
       {
           for(int j=0;j<m;j++)
           {
             if(i==j)cout<<"B";
             else cout<<"W";
           }
           cout<<endl;
       }

    }
}


#include<bits\stdc++.h>
#define all(x) x.begin(),x.end()
#define PI 3.14159265359
#define endl "\n"
typedef long long ll;
const ll mod = 1000000007;
using namespace std;
void Ali() { std::ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); }
ll gcd(ll a, ll b) { if (b == 0) { return a; } return gcd(b, a % b); }
ll lcm(ll a, ll b) { ll c = a * b; return (c / gcd(a, b)); }
ll fast_power(ll base, ll power) { if (power == 0)return 1; if (power == 1)return base; ll result = fast_power(base, power / 2) % mod; result *= result; result %= mod; if (power % 2)result *= base; return result %= mod; }

int main()
{
    Ali();
    ll t; cin>>t;
    while(t--) {
        ll n,m;
        cin>>n>>m;
        ll s=n*m;
        if(s%2==0) {

        }
        for(int i=0; i<n-1; i++) {
            for(int j=0; j<m; j++) {
                 cout<<"W";
            }
            cout<<endl;

        }
        for(int k=0; k<m; k++) {
            cout<<"B";
        }
        cout<<endl;
    }
}


#include<bits/stdc++.h>
using namespace std;
#define mx 32000
typedef long long ll;
vector<int>prime;
int arr[100005],str[100005];

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        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){
                    cout<<"W";
                }
                else
                    cout<<"B";
            }
            cout<<endl;
        }
        //cout<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define mx 32000
typedef long long ll;
vector<int>prime;
int arr[100005],str[100005];

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,m;
        cin>>n>>m;
        for(int i=1; i<=n; i++){
            for(int j=1; j<=m; j++){
                if(i==1 && j==1){
                    cout<<"W";
                }
                else
                    cout<<"B";
            }
            cout<<endl;
        }
        cout<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define mx 32000
typedef long long ll;
vector<int>prime;

int main()
{
    int t;
    cin>>t;
    while(t--){
        int m,n;
        cin>>m>>n;
        for(int i=1; i<=m; i++){
            for(int j=1; j<=n; j++){
                if(i%2==0){
                    cout<<"B";
                }
                else
                    cout<<"W";
            }
            cout<<endl;
        }
        cout<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define mx 32000
typedef long long ll;
vector<int>prime;
int arr[100005],str[100005];

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,m;
        cin>>n>>m;
        for(int i=1; i<=n; i++){
            for(int j=1; j<=m; j++){
                if(i==1 && j==1){
                    cout<<"W";
                }
                else
                    cout<<"B";
            }
            cout<<endl;
        }
        //cout<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define mx 32000
typedef long long ll;
vector<int>prime;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int m,n;
        cin>>m>>n;
        if(n%2!=0 && m%2!=0){
            for(int i=1; i<=m; i++)
            {
                for(int j=1; j<=n; j++)
                {
                    if(i%2!=0)
                    {
                        if(j%2!=0)
                            cout<<"B";
                        else
                            cout<<"W";
                    }
                    else
                    {
                        if(j%2!=0)
                            cout<<"W";
                        else
                            cout<<"B";
                    }
                }
                cout<<endl;
            }
        }
        else{
            for(int i=1; i<m; i++)
            {
                for(int j=1; j<=n; j++)
                {
                    if(i%2==0)
                    {
                        if(j%2==0)
                            cout<<"B";
                        else
                            cout<<"W";
                    }
                    else
                    {
                        if(j%2==0)
                            cout<<"W";
                        else
                            cout<<"B";
                    }
                }
                cout<<endl;
            }
            for(int i=1; i<=n-2; i++){

                if(m%2==0){
                    if(i%2!=0)
                            cout<<"W";
                        else
                            cout<<"B";
                }
                else{
                    if(i%2==0)
                            cout<<"W";
                        else
                            cout<<"B";
                }
            }
            cout<<"BB";
            cout<<endl;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define mx 32000
typedef long long ll;
vector<int>prime;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int m,n;
        cin>>m>>n;
        if(n%2!=0 && m%2!=0){
            for(int i=1; i<=m; i++)
            {
                for(int j=1; j<=n; j++)
                {
                    if(i%2!=0)
                    {
                        if(j%2!=0)
                            cout<<"B";
                        else
                            cout<<"W";
                    }
                    else
                    {
                        if(j%2!=0)
                            cout<<"W";
                        else
                            cout<<"B";
                    }
                }
                cout<<endl;
            }
        }
        else{
            for(int i=1; i<m; i++)
            {
                for(int j=1; j<=n; j++)
                {
                    if(i%2==0)
                    {
                        if(j%2==0)
                            cout<<"B";
                        else
                            cout<<"W";
                    }
                    else
                    {
                        if(j%2==0)
                            cout<<"W";
                        else
                            cout<<"B";
                    }
                }
                cout<<endl;
            }
            for(int i=1; i<=n; i++){

                cout<<"B";
            }
            cout<<endl;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define mx 32000
typedef long long ll;
vector<int>prime;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int m,n;
        cin>>m>>n;
        if(n%2!=0 && m%2!=0){
            for(int i=1; i<=m; i++)
            {
                for(int j=1; j<=n; j++)
                {
                    if(i%2!=0)
                    {
                        if(j%2!=0)
                            cout<<"B";
                        else
                            cout<<"W";
                    }
                    else
                    {
                        if(j%2!=0)
                            cout<<"W";
                        else
                            cout<<"B";
                    }
                }
                cout<<endl;
            }
        }
        else{
            for(int i=1; i<m; i++)
            {
                for(int j=1; j<=n; j++)
                {
                    if(i%2==0)
                    {
                        if(j%2==0)
                            cout<<"B";
                        else
                            cout<<"W";
                    }
                    else
                    {
                        if(j%2==0)
                            cout<<"W";
                        else
                            cout<<"B";
                    }
                }
                cout<<endl;
            }
            for(int i=1; i<=n; i++){

                cout<<"B";
            }
            cout<<endl;
        }

        cout<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define mx 32000
typedef long long ll;
vector<int>prime;
int arr[100005],str[100005];

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        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){
                    cout<<"W";
                }
                else
                    cout<<"B";
            }
            cout<<endl;
        }
        cout<<endl;
    }
    return 0;
}


    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    int t;

    cin>>t;
    while(t--)
    {
    char x='B';
    int n,m,i,j;
    cin>>n>>m;
    for(i=0;i<n;i++)
    {

    for(j=0;j<m;j++)
    {

    cout<<x;
    if(x=='B')
    x='W';
    else if(x=='W')
    x='B';
    }

    cout<<endl;

    }

    }
    return 0;
    }


    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    int t;
     bool z=false,f=false;
    cin>>t;
    while(t--)
    {
    char x='B';
    int n,m,i,j;
    cin>>n>>m;
    char a[n][m];
    if(n%2==0 || m%2==0)
    {z=true;}
    for(i=0;i<n;i++)
    {if(i%2==0)
		x='B';
		else
		x='W';

    for(j=0;j<m;j++)
   {
	    a[i][j]=x;
    	if(x=='B')
        x='W';
    else if(x=='W')
    x='B';

}
    }

    if(z){
   for(i=0;i<n;i++)
   {
	  for(j=0;j<m;j++)
	  {
		 if(a[i][j]=='W')
		 {a[i][j]='B';

			f=true;
			break;
			 }

		 } if(f)
		 {break;}

	  }}

	  for(i=0;i<n;i++)
	  {
		 for(j=0;j<m;j++)
		 {
			cout<<a[i][j] ;

			}
		  cout<<endl;
		 }

    }

    return 0;
    }


    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    int t;
     bool z=false;
    cin>>t;
    while(t--)
    {
    char x='B';
    int n,m,i,j;
    cin>>n>>m;
    if((n*m)%2==0)
    {z=true;}
    for(i=0;i<n;i++)
    {
    	if(i%2==0)
		x='B';
		else
		x='W';
    for(j=0;j<m;j++)
    {

    	if(i==n-1 && j==m-1 && z)
    	{cout<<'B';break;}
    cout<<x;
    if(x=='B')
    x='W';
    else if(x=='W')
    x='B';
    }

    cout<<endl;

    }

    }
    return 0;
    }


    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    int t;
     bool z=false;
    cin>>t;
    while(t--)
    {
    char x='B';
    int n,m,i,j;
    cin>>n>>m;
    if(m%2==0)
    {z=true;}
    for(i=0;i<n;i++)
    {
    	if(i%2==0)
		x='B';
		else
		x='W';
    for(j=0;j<m;j++)
    {

    	if(i==n-1 && j==m-1 && z)
    	{cout<<'B';break;}
    cout<<x;
    if(x=='B')
    x='W';
    else if(x=='W')
    x='B';
    }

    cout<<endl;

    }

    }
    return 0;
    }


#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;

cin>>t;
while(t--)
{
char x='B';
int n,m,i,j;
cin>>n>>m;
for(i=0;i<n;i++)
{

for(j=0;j<m;j++)
{

cout<<x;
if(x=='B')
x='W';
else if(x=='W')
x='B';
}
if(x=='B')
x='W';
else if(x=='W')
x='B';
cout<<endl;

}

}
return 0;
}


#include <bits/stdc++.h>
 using namespace std;
 int main(){
int t;
cin>>t;
while(t--){
int n,m,i,j;
cin>>n>>m;
cout<<"B";
for(i=1;i<n;i++)
cout<<"W";
cout<<endl;
for(i=1;i<n;i++)
{
for(j=0;j<m;j++)
{
cout<<"B";

}
cout<<endl;
}

}
    return 0;
    }


#include <bits/stdc++.h>
 using namespace std;
 int main(){
int t;
cin>>t;
while(t--){
int n,m,i,j;
cin>>n>>m;
cout<<"B";
for(i=1;i<m;i++)
cout<<"W";
cout<<endl;
for(i=1;i<n;i++)
{
for(j=0;j<m;j++)
{
cout<<"B";

}
cout<<endl;
}

}
    return 0;
    }


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i,n) for(int i = 0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<=n;i++)
long long q,sss,jjj,n,xxx[100005],yyy[100005];
bool f;
vector<int>arr(10000),brr(10000);
int main(){
	ll t;
	cin >> t;
	// t = 1;
	while(t--){
		int n,i,j,m;
		cin>>n>>m;
		char arr[n][m];
		for(i=0;i<n;i++)
		{
			for(j=0;j<m;j++)
			arr[i][j]='B';
		}
		for(i=0;i<n-1;i++)
		arr[i][m-1]='W';
		for(i=0;i<n;i++)
		{
			for(j=0;j<m;j++)
			cout<<arr[i][j];
			cout<<endl;
		}
		cout<<endl;
	}
 }


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i,n) for(int i = 0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<=n;i++)
long long q,sss,jjj,n,xxx[100005],yyy[100005];
bool f;
vector<int>arr(10000),brr(10000);
int main(){
	ll t;
	cin >> t;
	// t = 1;
	while(t--){
		int n,m,i,j;
		cin>>n>>m;
		Fo(i,1,n)
		{
			Fo(j,1,m)
			{
				if((j+i)%2==0)
				cout<<"B";
				else
				cout<<"W";
			}
			cout<<endl;
		}

	}
 }


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i,n) for(int i = 0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<=n;i++)
long long q,sss,jjj,n,xxx[100005],yyy[100005];
bool f;
vector<int>arr(10000),brr(10000);
int main(){
	ll t;
	cin >> t;
	// t = 1;
	while(t--){
		ll n,m;
		cin >> n >> m;
		bool a;
	   	if(m%2==0){
	   		a=true;
	   	}
	   	else a=false;
	   	if(a==true){
	   	for(ll i=0;i<n-1;i++){
	   	   for(ll j=0;j<m/2;j++){
	   	   	  cout<<"BW";
	       }
	       cout<<" "<<endl;
	   	}
	   	cout<<"BB";
	   	for(ll i=0;i<m/2-1;i++){
	   	   	  cout<<"BW";
	       }
	   	cout<<endl;
	}
	    if(a==false){
	    for(ll i=0;i<n;i++){
	   	   for(ll j=0;j<m/2;j++){
	   	   	  cout<<"BW";
	       }
	       if(i<(n/2)+1) cout<<"B"<<endl;
	       else if(i>=(n/2)+1) cout<<"W"<<endl;
	    }
	       // cout<<endl;
	   	}
	}

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i,n) for(int i = 0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<=n;i++)
long long q,sss,jjj,n,xxx[100005],yyy[100005];
bool f;
vector<int>arr(10000),brr(10000);
int main(){
	ll t;
	cin >> t;
	// t = 1;
	while(t--){
		char arr[2]={'B','W'};
		int n,k,m;cin>>n>>m;
		int i,j;
		if(n%2==1&&m%2==1){
		k=0;
		fo(i,n){
		for(j=0;j<m;j++){
		cout<<arr[k];
		k=1-k;
		}
		cout<<endl;
		}
		}
		if(m%2==0){
		k=0;
		fo(i,n){
			fo(j,m){
				if(j==m-1&&i==n-1)
					cout<<"B";
				else
					cout<<arr[k];
					k=1-k;
			}
			cout<<endl;
			}
		}
		if(m%2==1&&n%2==0){
			k=0;
			fo(i,n){
				fo(j,m){
					cout<<arr[k];
					k=1-k;
					// if(j==m-1&&i==n-2)
					// k=1-k;
				}
				cout<<endl;
			}
		}
	}
 }


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i,n) for(int i = 0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<=n;i++)
vector<int>arr(10000),brr(10000);
int main(){
	ll t;
	cin >> t;
	// t = 1;
	while(t--){
		int n,m;
    	cin>>n>>m;
    	for(int i=0;i<n;i++)
    	{
    		if(i%2==0)
    		{
	    		for(int j=0;j<m;j++)
	    		{
	    			if(i==0&&j==1) cout<<"B";
					else if(j%2==0) cout<<"B";
					else cout<<"W";
	    		}
	    		cout<<endl;
	    	}
	    	else
	    	{
	    		for(int j=0;j<m;j++)
	    		{
					if(j%2==0) cout<<"W";
					else cout<<"B";
	    		}
	    		cout<<endl;
	    	}
    	}

	}
 }


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i,n) for(int i = 0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<=n;i++)
vector<int>arr(10000),brr(10000);
int main(){
	ll t;
	// cin >> t;
	t = 1;
	while(t--){
		ll n,m ;
		cin >> n >> m ;
		char arr[n][m] ;
		for (int i = 0; i < n; i++)
		{
			for (int j = 0; j < m; j++)
			{
				if (i==0)
				{
					if (j < m-1)
						arr[i][j] = 'W' ;
					else
						arr[i][j] = 'B' ;
				}
				else
					arr[i][j] = 'B' ;
			}
		}
		for (int i = 0; i < n; i++)
		{
			for (int j = 0; j < m; j++)
			{
				cout << arr[i][j] ;
			}
			cout << endl ;
		}

	}
 }


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i,n) for(int i = 0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<=n;i++)
vector<int>arr(10000),brr(10000);
int main(){
	ll t;
	cin >> t;
// 	t = 1;
	while(t--){
		ll n,m;
		cin >> n >> m;
		fo(i,n){
			fo(j,m){
				if(j%2) cout << "B";
				else cout << "W";
			}
			cout << endl;
		}

	}
 }


#include<bits/stdc++.h>
using namespace std;

#define pb push_back
#define ll long long
#define FIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define fo(i,n) for(int i=0;i<n;i++)

int main() {
    int t;
    cin>>t;
    // t = 1;
    while(t--){
        int n,m;
        cin>>n>>m;
        char ans;
        for(int i=0;i<n-1;i++){
                if(i%2==0)
                    ans ='B';
                else
                    ans ='W';
                for(int j=0;j<m;j++){
                    cout<<ans;
                    if(ans =='W')
                        ans ='B';
                    else
                        ans ='W';
                }
                cout<<endl;
            }
        if(n%2==0){
            cout<<'B';
            ans ='B';
            for(int i=1;i<m;i++){
                cout<<ans;
                    if(ans =='W')
                        ans ='B';
                    else
                        ans ='W';
            }
            cout<<endl;
        }
        else{
            if(m%2==0){
                ans ='B';
                for(int i=0;i<m-1;i++){
                    cout<<ans;
                    if(ans =='W')
                        ans ='B';
                    else
                        ans ='W';
                }
                cout<<'B'<<endl;
            }
            else{
                ans ='B';
                for(int i=0;i<m;i++){
                    cout<<ans;
                    if(ans =='W')
                        ans ='B';
                    else
                        ans ='W';
                }
                cout<<endl;
            }
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i,n) for(int i = 0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<=n;i++)
long long q,sss,jjj,n,xxx[100005],yyy[100005];
bool f;
vector<int>arr(10000),brr(10000);
int main(){
	ll t;
	cin >> t;
	// t = 1;
	while(t--){
		int n,i,j,m;
		cin>>n>>m;
		char arr[n][m];
		if(n>m)
		{
			fo(i,n-1)
			{
				fo(j,m)
				{
					if(i%2==0)
					arr[i][j]='B';
					else
					arr[i][j]='W';
				}
			}
			arr[n-1][0]='B';
			arr[n-1][1]='B';
			for(j=2;j<m;j++)
			{
				if(j%2==0)
				arr[n-1][j]='W';
				else
				arr[n-1][j]='B';
			}
		}
		else
		{
			fo(i,n)
			{
				fo(i,m-1)
				{
					if(j%2==0)
					arr[i][j]='B';
					else
					arr[i][j]='W';
				}
			}
			arr[0][m-1]='B';
			arr[1][m-1]='B';
			Fo(i,2,m-1)
			{
				if(i%2==0)
				arr[i][m-1]='W';
				else
				arr[i][m-1]='B';
			}
		}
		fo(i,n)
		{
			for(j=0;j<m;j++)
			cout<<arr[i][j];
			cout<<endl;
		}
	}
 }


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    for(int q=0; q<t; q++)
    {
        int n,m;
        cin>>n>>m;
        if(n==1&&m%2==0)
            {cout<<"B";
        for(int i=1;i<m;i++)
            if(i%2!=0)cout<<"B";
            else cout<<"W";

      cout<<endl;  continue;
            }
         if(n==1&&m%2!=0)
         {
             for(int i=1;i<=m;i++)
                if(i%2!=0)cout<<"B";
                 else cout<<"W";
              cout<<endl; continue;
         }

         if(n%2==0&&m==1)
         {
             cout<<"B"<<endl;;
             for(int i=1;i<n;i++)
             {
                 if(i%2!=0)
                    cout<<"B";
                 else cout<<"W";
                 cout<<endl;
             }
             continue;
         }
         if(n%2!=0&&m==1)
         { for(int i=1;i<=n;i++)
             {
                 if(i%2!=0)
                    cout<<"B";
                 else cout<<"W";
                 cout<<endl;
             }
             continue;

         }

        if(n>=m)
        {
            if((n*m)%2!=0)
            {
                for(int i=1; i<=n/2+1; i++)
                {
                    for(int j=1; j<=m; j++)
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    cout<<endl;
                }
                for(int i=1; i<=n/2; i++)
                {

                    for(int j=1; j<=m; j++)
                    {
                        if(j==m)
                        {
                            cout<<"W";
                            continue;
                        }
                        if(j%2!=0&&j!=m)cout<<"B";
                        else cout<<"W";

                    }
                    cout<<endl;
                }
            }
            else
            {   if(n%2==0){

                for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)

                    {
                        if(i==n&&j==2)
                        {
                            cout<<"B";
                            continue;
                        }
                        if(i>(n/2)&&j==m){cout<<"W";continue;}
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }

            }
            else{

                for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)

                    {
                        if(i==n&&j==2)
                        {
                            cout<<"B";
                            continue;
                        }
                      //  if(i>(n/2)&&j==m){cout<<"W";continue;}
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }

            }
            }

        }
        else
        {
            if(n*m%2==0){
                if(n%2!=0){
                for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)
                    {

                        if(i==2&&j==1)
                        {
                            cout<<"B";
                            continue;
                        }
                        if(i==n&&j<=m/2){cout<<"W";continue;}

                        if(i%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }

                }
                else

                    {  for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)
                    {

                        if(i==2&&j==1)
                        {
                            cout<<"B";
                            continue;
                        }
                       // if(i==n&&j>m/2){cout<<"W";continue;}

                        if(i%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }

                    }
                }
            if((n*m)%2!=0)
            {
                for(int i=1; i<=n/2+1; i++)
                {
                    for(int j=1; j<=m; j++)
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    cout<<endl;
                }
                for(int i=1; i<=n/2; i++)
                {

                    for(int j=1; j<=m; j++)
                    {
                        if(j==m)
                        {
                            cout<<"W";
                            continue;
                        }
                        if(j%2!=0&&j!=m)cout<<"B";
                        else cout<<"W";

                    }
                    cout<<endl;
                }
            }

        }

    }

}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    for(int q=0; q<t; q++)
    {
        int n,m;
        cin>>n>>m;
        if(n==1&&m%2==0)
            {cout<<"B";
        for(int i=1;i<m;i++)
            if(i%2!=0)cout<<"B";
            else cout<<"W";

      cout<<endl;  continue;
            }
         if(n==1&&m%2!=0)
         {
             for(int i=1;i<=m;i++)
                if(i%2!=0)cout<<"B";
                 else cout<<"W";
              cout<<endl; continue;
         }

         if(n%2==0&&m==1)
         {
             cout<<"B"<<endl;;
             for(int i=1;i<n;i++)
             {
                 if(i%2!=0)
                    cout<<"B";
                 else cout<<"W";
                 cout<<endl;
             }
             continue;
         }
         if(n%2!=0&&m==1)
         { for(int i=1;i<=n;i++)
             {
                 if(i%2!=0)
                    cout<<"B";
                 else cout<<"W";
                 cout<<endl;
             }
             continue;

         }

        if(n>=m)
        {
            if((n*m)%2!=0)
            {
                for(int i=1; i<=n/2+1; i++)
                {
                    for(int j=1; j<=m; j++)
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    cout<<endl;
                }
                for(int i=1; i<=n/2; i++)
                {

                    for(int j=1; j<=m; j++)
                    {
                        if(j==m)
                        {
                            cout<<"W";
                            continue;
                        }
                        if(j%2!=0&&j!=m)cout<<"B";
                        else cout<<"W";

                    }
                    cout<<endl;
                }
            }
            else
            {   if(n%2==0){

                for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)

                    {
                        if(i==n&&j==2)
                        {
                            cout<<"B";
                            continue;
                        }
                        if(i>(n/2)&&j==m){cout<<"W";continue;}
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }

            }
            else{

                for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)

                    {
                        if(i==n&&j==2)
                        {
                            cout<<"B";
                            continue;
                        }
                      //  if(i>(n/2)&&j==m){cout<<"W";continue;}
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }

            }
            }

        }
        else
        {
            if(n*m%2==0){
                if(n%2!=0){
                for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)
                    {

                        if(i==2&&j==1)
                        {
                            cout<<"B";
                            continue;
                        }
                        if(i==n&&j>m/2){cout<<"W";continue;}

                        if(i%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }
                }
                else

                    {  for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)
                    {

                        if(i==2&&j==1)
                        {
                            cout<<"B";
                            continue;
                        }
                       // if(i==n&&j>m/2){cout<<"W";continue;}

                        if(i%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }

                    }
                }
            if((n*m)%2!=0)
            {
                for(int i=1; i<=n/2+1; i++)
                {
                    for(int j=1; j<=m; j++)
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    cout<<endl;
                }
                for(int i=1; i<=n/2; i++)
                {

                    for(int j=1; j<=m; j++)
                    {
                        if(j==m)
                        {
                            cout<<"W";
                            continue;
                        }
                        if(j%2!=0&&j!=m)cout<<"B";
                        else cout<<"W";

                    }
                    cout<<endl;
                }
            }

        }

    }

}


#include <iostream>

using namespace std;

int main()
{    int t;cin>>t;
for(int q=0;q<t;q++){
    int n,m;
    cin>>n>>m;
    if(n>=m){
    if((n*m)%2!=0)
    {
        for(int i=1;i<=n/2+1;i++)
            {for(int j=1;j<=m;j++)
            if(j%2!=0)cout<<"B";
            else cout<<"W";
            cout<<endl;}
             for(int i=1;i<=n/2;i++)
             {

                for(int j=1;j<=m;j++)
            {if(j==m){cout<<"W";continue;}
            if(j%2!=0&&j!=m)cout<<"B";
                  else cout<<"W";

            }cout<<endl;
             }
    }
    else{

         for(int i=1;i<=n;i++)
            {for(int j=1;j<=m;j++)

             {if(i==n&&j==2){cout<<"B";continue;}
                 if(j%2!=0)cout<<"B";
                  else cout<<"W";}
            cout<<endl;}

    }
  cout<<endl;
}
else{
if(n*m%2==0)
    for(int i=1;i<=n;i++)
{
    for(int j=1;j<=m;j++)
     {

        if(i==2&&j==1)
    {
        cout<<"B";
        continue;
    }

    if(i%2!=0)cout<<"B";
    else cout<<"W";
     }
     cout<<endl;
}
  if((n*m)%2!=0)
    {
        for(int i=1;i<=n/2+1;i++)
            {for(int j=1;j<=m;j++)
            if(j%2!=0)cout<<"B";
            else cout<<"W";
            cout<<endl;}
             for(int i=1;i<=n/2;i++)
             {

                for(int j=1;j<=m;j++)
            {if(j==m){cout<<"W";continue;}
            if(j%2!=0&&j!=m)cout<<"B";
                  else cout<<"W";

            }cout<<endl;
             }
    }

}

}

}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    for(int q=0; q<t; q++)
    {
        int n,m;
        cin>>n>>m;
        if(n==1&&m%2==0)
            {cout<<"B";
        for(int i=1;i<m;i++)
            if(i%2!=0)cout<<"B";
            else cout<<"W";

      cout<<endl;  continue;
            }
         if(n==1&&m%2!=0)
         {
             for(int i=1;i<=m;i++)
                if(i%2!=0)cout<<"B";
                 else cout<<"W";
              cout<<endl; continue;
         }

         if(n%2==0&&m==1)
         {
             cout<<"B"<<endl;;
             for(int i=1;i<n;i++)
             {
                 if(i%2!=0)
                    cout<<"B";
                 else cout<<"W";
                 cout<<endl;
             }
             continue;
         }
         if(n%2!=0&&m==1)
         { for(int i=1;i<=n;i++)
             {
                 if(i%2!=0)
                    cout<<"B";
                 else cout<<"W";
                 cout<<endl;
             }
             continue;

         }
       if(n%2!=0&&m%2!=0)
       {
           for(int i=1;i<n;i++)
           {
               for(int j=1;j<=m;j++)
               {
                   if(i%2!=0)cout<<"B";
                   else cout<<"W";
               }
               cout<<endl;
           }
           for(int i=1;i<=m;i++)
            if(i%2!=0)cout<<"B";
           else cout<<"W";
           cout<<endl;
           continue;
       }

       if(n%2==0)
       {
           for(int i=1;i<=n;i++)
           {
               for(int j=1;j<=m;j++)
               {
                   if(i==2&&j==1){cout<<"B";continue;}
                   if(i%2!=0)cout<<"B";
                   else cout<<"W";
               }
               cout<<endl;
           }
       }
       if(n%2!=0)
       {

           for(int i=1;i<n;i++)
           {
               for(int j=1;j<=m;j++)
               {

                   if(i==2&&j==1){cout<<"B";continue;}
                   if(i%2!=0)cout<<"B";
                   else cout<<"W";

               }cout<<endl;
           }
           for(int i=1;i<=m;i++)
            if(i%2==0)cout<<"B";
           else cout<<"W";
           cout<<endl;
       }

    }

}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    for(int q=0; q<t; q++)
    {
        int n,m;
        cin>>n>>m;
        if(n==1&&m%2==0)
            {cout<<"B";
        for(int i=1;i<m;i++)
            if(i%2!=0)cout<<"B";
            else cout<<"W";

      cout<<endl;  continue;
            }
         if(n==1&&m%2!=0)
         {
             for(int i=1;i<=m;i++)
                if(i%2!=0)cout<<"B";
                 else cout<<"W";
              cout<<endl; continue;
         }

         if(n%2==0&&m==1)
         {
             cout<<"B"<<endl;;
             for(int i=1;i<n;i++)
             {
                 if(i%2!=0)
                    cout<<"B";
                 else cout<<"W";
                 cout<<endl;
             }
             continue;
         }
         if(n%2!=0&&m==1)
         { for(int i=1;i<=n;i++)
             {
                 if(i%2!=0)
                    cout<<"B";
                 else cout<<"W";
                 cout<<endl;
             }
             continue;

         }

        if(n>=m)
        {
            if((n*m)%2!=0)
            {
                for(int i=1; i<=n/2+1; i++)
                {
                    for(int j=1; j<=m; j++)
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    cout<<endl;
                }
                for(int i=1; i<=n/2; i++)
                {

                    for(int j=1; j<=m; j++)
                    {
                        if(j==m)
                        {
                            cout<<"W";
                            continue;
                        }
                        if(j%2!=0&&j!=m)cout<<"B";
                        else cout<<"W";

                    }
                    cout<<endl;
                }
            }
            else
            {

                for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)

                    {
                        if(i==n&&j==2)
                        {
                            cout<<"B";
                            continue;
                        }
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }

            }

        }
        else
        {
            if(n*m%2==0)
                for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)
                    {

                        if(i==2&&j==1)
                        {
                            cout<<"B";
                            continue;
                        }

                        if(i%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }
            if((n*m)%2!=0)
            {
                for(int i=1; i<=n/2+1; i++)
                {
                    for(int j=1; j<=m; j++)
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    cout<<endl;
                }
                for(int i=1; i<=n/2; i++)
                {

                    for(int j=1; j<=m; j++)
                    {
                        if(j==m)
                        {
                            cout<<"W";
                            continue;
                        }
                        if(j%2!=0&&j!=m)cout<<"B";
                        else cout<<"W";

                    }
                    cout<<endl;
                }
            }

        }

    }

}


#include <iostream>

using namespace std;

int main()
{
    int t;
    cin>>t;
    for(int q=0; q<t; q++)
    {
        int n,m;
        cin>>n>>m;
        if(n>=m)
        {
            if((n*m)%2!=0)
            {
                for(int i=1; i<=n/2+1; i++)
                {
                    for(int j=1; j<=m; j++)
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    cout<<endl;
                }
                for(int i=1; i<=n/2; i++)
                {

                    for(int j=1; j<=m; j++)
                    {
                        if(j==m)
                        {
                            cout<<"W";
                            continue;
                        }
                        if(j%2!=0&&j!=m)cout<<"B";
                        else cout<<"W";

                    }
                    cout<<endl;
                }
            }
            else
            {

                for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)

                    {
                        if(i==n&&j==2)
                        {
                            cout<<"B";
                            continue;
                        }
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }

            }

        }
        else
        {
            if(n*m%2==0)
                for(int i=1; i<=n; i++)
                {
                    for(int j=1; j<=m; j++)
                    {

                        if(i==2&&j==1)
                        {
                            cout<<"B";
                            continue;
                        }

                        if(i%2!=0)cout<<"B";
                        else cout<<"W";
                    }
                    cout<<endl;
                }
            if((n*m)%2!=0)
            {
                for(int i=1; i<=n/2+1; i++)
                {
                    for(int j=1; j<=m; j++)
                        if(j%2!=0)cout<<"B";
                        else cout<<"W";
                    cout<<endl;
                }
                for(int i=1; i<=n/2; i++)
                {

                    for(int j=1; j<=m; j++)
                    {
                        if(j==m)
                        {
                            cout<<"W";
                            continue;
                        }
                        if(j%2!=0&&j!=m)cout<<"B";
                        else cout<<"W";

                    }
                    cout<<endl;
                }
            }

        }

    }

}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(0);
//   #include <ext/pb_ds/assoc_container.hpp>

//   using namespace __gnu_pbds;
using namespace std;

typedef unsigned long long int ull;
typedef long double ldb;
typedef long long int ll;

#define for01(k,n)      for (ll i=k; i<n; i++)
#define for02(k,n)      for (ll j=k; j<n; j++)
#define for03(k,n)      for (ll k=k; k<n; k++)
#define for11(k,n)      for (ll i=k; i<=n; i++)
#define for12(k,n)      for (ll j=k; j<=n; j++)
#define for13(k,n)      for (ll k=k; k<=n; k++)
#define forIT(c,it)     for(typeof(c.begin()) it = c.begin(); it != c.end(); ++it)

// 2-Way iteration possible
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))

#define pb      push_back
#define mp      make_pair

#define pf          push_front
#define popf        pop_front
#define popb        pop_back

#define vll     vector<ll>
#define vint        vector<int>
#define mll     map<ll,ll>
#define mint        map<int,int>

#define mll_it      map<ll,ll>::iterator
#define mint_it     map<int,int>::iterator

#define all(c)      c.begin(), c.end()

#define F       first
#define S       second
#define pp      pair <ll, ll>

#define lb      lower_bound

#define ub      upper_bound

#define emp     empty()
#define beg     begin()
#define en      end()
#define si      size()
#define bk      back()

#define present(c,el)   (c.find(el) != c.end())     // For containers with member function ‘find()’ (i.e. set/map, etc.)
#define cpresent(c,el)  (find(all(c),el) != c.end())    // For vectors

#define deci(n)     fixed<<setprecision(n)

#define p0(a)       cout << a << " "
#define p1(a)       cout << a << "\n"

#define mem(a,n)    memset(a, n, sizeof(a)); // n = 0 OR -1 only

#define MAX     LLONG_MAX
#define MIN     LLONG_MIN
#define MOD1        1000000007
#define MOD2        998244353
#define val1    1e6
#define BOOST       ios_base::sync_with_stdio(false); cin.tie(NULL)
const int h5=100000,h6=100000,h3=1e3;
const ull h9=100000000,h18=1e18;
#define tenp9 1e9
#define tenp6 1e6

#define ten5 100000
#define SIZE 100000 + 1
ll gcd(ll a,ll b){if(b==0) return a; return gcd(b,a%b);}
ll pow1(ll a,ll b,ll m)
{
  ll res=1;
  while(b>0)
  {
    if(b&1)
      res=(1ll*a*res)%m;
    b=(b>>1);
    a=(1ll*a*a)%m;
  }
  return res;
}
void f1()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    fast;
    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
    #endif
}
void solve()
{
  int n,m;cin>>n>>m;
  char res[n][m];

  for(int i=0;i<m-1;i++)
  {
    for(int j=0;j<n;j++)
    {

      res[j][i]='B';

    }

  }
  for(int i=0;i<(n-1)/2;i++)
    {
      res[i][m-1]='W';
    }
  for(int i=(n-1)/2;i<n;i++)
    {
      res[i][m-1]='B';
    }
  if(n==2 )
  {
    res[0][m-1]='W';
  }
  for01(0,n)
  {
    for02(0,m)
    {
      cout<<res[i][j];
    }cout<<endl;
  }

}
int main()
{
 f1();
 int t;
 cin>>t;
 while(t--)
  solve();
  return 0;
}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(0);
//   #include <ext/pb_ds/assoc_container.hpp>

//   using namespace __gnu_pbds;
using namespace std;

typedef unsigned long long int ull;
typedef long double ldb;
typedef long long int ll;

#define for01(k,n)      for (ll i=k; i<n; i++)
#define for02(k,n)      for (ll j=k; j<n; j++)
#define for03(k,n)      for (ll k=k; k<n; k++)
#define for11(k,n)      for (ll i=k; i<=n; i++)
#define for12(k,n)      for (ll j=k; j<=n; j++)
#define for13(k,n)      for (ll k=k; k<=n; k++)
#define forIT(c,it)     for(typeof(c.begin()) it = c.begin(); it != c.end(); ++it)

// 2-Way iteration possible
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))

#define pb      push_back
#define mp      make_pair

#define pf          push_front
#define popf        pop_front
#define popb        pop_back

#define vll     vector<ll>
#define vint        vector<int>
#define mll     map<ll,ll>
#define mint        map<int,int>

#define mll_it      map<ll,ll>::iterator
#define mint_it     map<int,int>::iterator

#define all(c)      c.begin(), c.end()

#define F       first
#define S       second
#define pp      pair <ll, ll>

#define lb      lower_bound

#define ub      upper_bound

#define emp     empty()
#define beg     begin()
#define en      end()
#define si      size()
#define bk      back()

#define present(c,el)   (c.find(el) != c.end())     // For containers with member function ‘find()’ (i.e. set/map, etc.)
#define cpresent(c,el)  (find(all(c),el) != c.end())    // For vectors

#define deci(n)     fixed<<setprecision(n)

#define p0(a)       cout << a << " "
#define p1(a)       cout << a << "\n"

#define mem(a,n)    memset(a, n, sizeof(a)); // n = 0 OR -1 only

#define MAX     LLONG_MAX
#define MIN     LLONG_MIN
#define MOD1        1000000007
#define MOD2        998244353
#define val1    1e6
#define BOOST       ios_base::sync_with_stdio(false); cin.tie(NULL)
const int h5=100000,h6=100000,h3=1e3;
const ull h9=100000000,h18=1e18;
#define tenp9 1e9
#define tenp6 1e6

#define ten5 100000
#define SIZE 100000 + 1
ll gcd(ll a,ll b){if(b==0) return a; return gcd(b,a%b);}
ll pow1(ll a,ll b,ll m)
{
  ll res=1;
  while(b>0)
  {
    if(b&1)
      res=(1ll*a*res)%m;
    b=(b>>1);
    a=(1ll*a*a)%m;
  }
  return res;
}
void f1()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    fast;
    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
    #endif
}
void solve()
{
  int n,m;cin>>n>>m;
  char res[n][m];
  if(n==2 and m==2)
  {
    cout<<"BW\nBB\n";return;
  }
  for(int i=0;i<m-1;i++)
  {
    for(int j=0;j<n;j++)
    {

      res[j][i]='B';

    }

  }
  for(int i=0;i<(n-1)/2;i++)
    {
      res[i][m-1]='W';
    }
  for(int i=(n-1)/2;i<n;i++)
    {
      res[i][m-1]='B';
    }
  for01(0,n)
  {
    for02(0,m)
    {
      cout<<res[i][j];
    }cout<<endl;
  }

}
int main()
{
 f1();
 int t;
 cin>>t;
 while(t--)
  solve();
  return 0;
}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(0);
//   #include <ext/pb_ds/assoc_container.hpp>

//   using namespace __gnu_pbds;
using namespace std;

typedef unsigned long long int ull;
typedef long double ldb;
typedef long long int ll;

#define for01(k,n)      for (ll i=k; i<n; i++)
#define for02(k,n)      for (ll j=k; j<n; j++)
#define for03(k,n)      for (ll k=k; k<n; k++)
#define for11(k,n)      for (ll i=k; i<=n; i++)
#define for12(k,n)      for (ll j=k; j<=n; j++)
#define for13(k,n)      for (ll k=k; k<=n; k++)
#define forIT(c,it)     for(typeof(c.begin()) it = c.begin(); it != c.end(); ++it)

// 2-Way iteration possible
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))

#define pb      push_back
#define mp      make_pair

#define pf          push_front
#define popf        pop_front
#define popb        pop_back

#define vll     vector<ll>
#define vint        vector<int>
#define mll     map<ll,ll>
#define mint        map<int,int>

#define mll_it      map<ll,ll>::iterator
#define mint_it     map<int,int>::iterator

#define all(c)      c.begin(), c.end()

#define F       first
#define S       second
#define pp      pair <ll, ll>

#define lb      lower_bound

#define ub      upper_bound

#define emp     empty()
#define beg     begin()
#define en      end()
#define si      size()
#define bk      back()

#define present(c,el)   (c.find(el) != c.end())     // For containers with member function ‘find()’ (i.e. set/map, etc.)
#define cpresent(c,el)  (find(all(c),el) != c.end())    // For vectors

#define deci(n)     fixed<<setprecision(n)

#define p0(a)       cout << a << " "
#define p1(a)       cout << a << "\n"

#define mem(a,n)    memset(a, n, sizeof(a)); // n = 0 OR -1 only

#define MAX     LLONG_MAX
#define MIN     LLONG_MIN
#define MOD1        1000000007
#define MOD2        998244353
#define val1    1e6
#define BOOST       ios_base::sync_with_stdio(false); cin.tie(NULL)
const int h5=100000,h6=100000,h3=1e3;
const ull h9=100000000,h18=1e18;
#define tenp9 1e9
#define tenp6 1e6

#define ten5 100000
#define SIZE 100000 + 1
ll gcd(ll a,ll b){if(b==0) return a; return gcd(b,a%b);}
ll pow1(ll a,ll b,ll m)
{
  ll res=1;
  while(b>0)
  {
    if(b&1)
      res=(1ll*a*res)%m;
    b=(b>>1);
    a=(1ll*a*a)%m;
  }
  return res;
}
void f1()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    fast;
    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
    #endif
}
void solve()
{
  int n,m;cin>>n>>m;
  char res[n][m];
  for(int i=0;i<m-1;i++)
  {
    for(int j=0;j<n;j++)
    {
      if(i%2==0)
      res[j][i]='B';
      else
      res[j][i]='W';
    }

  }
  for(int i=0;i<(n-1)/2;i++)
    {
      res[i][m-1]='W';
    }
  for(int i=(n-1)/2;i<n;i++)
    {
      res[i][m-1]='B';
    }
  for01(0,n)
  {
    for02(0,m)
    {
      cout<<res[i][j]<<" ";
    }cout<<endl;
  }

}
int main()
{
 f1();
 int t;
 cin>>t;
 while(t--)
  solve();
  return 0;
}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(0);
//   #include <ext/pb_ds/assoc_container.hpp>

//   using namespace __gnu_pbds;
using namespace std;

typedef unsigned long long int ull;
typedef long double ldb;
typedef long long int ll;

#define for01(k,n)      for (ll i=k; i<n; i++)
#define for02(k,n)      for (ll j=k; j<n; j++)
#define for03(k,n)      for (ll k=k; k<n; k++)
#define for11(k,n)      for (ll i=k; i<=n; i++)
#define for12(k,n)      for (ll j=k; j<=n; j++)
#define for13(k,n)      for (ll k=k; k<=n; k++)
#define forIT(c,it)     for(typeof(c.begin()) it = c.begin(); it != c.end(); ++it)

// 2-Way iteration possible
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))

#define pb      push_back
#define mp      make_pair

#define pf          push_front
#define popf        pop_front
#define popb        pop_back

#define vll     vector<ll>
#define vint        vector<int>
#define mll     map<ll,ll>
#define mint        map<int,int>

#define mll_it      map<ll,ll>::iterator
#define mint_it     map<int,int>::iterator

#define all(c)      c.begin(), c.end()

#define F       first
#define S       second
#define pp      pair <ll, ll>

#define lb      lower_bound

#define ub      upper_bound

#define emp     empty()
#define beg     begin()
#define en      end()
#define si      size()
#define bk      back()

#define present(c,el)   (c.find(el) != c.end())     // For containers with member function ‘find()’ (i.e. set/map, etc.)
#define cpresent(c,el)  (find(all(c),el) != c.end())    // For vectors

#define deci(n)     fixed<<setprecision(n)

#define p0(a)       cout << a << " "
#define p1(a)       cout << a << "\n"

#define mem(a,n)    memset(a, n, sizeof(a)); // n = 0 OR -1 only

#define MAX     LLONG_MAX
#define MIN     LLONG_MIN
#define MOD1        1000000007
#define MOD2        998244353
#define val1    1e6
#define BOOST       ios_base::sync_with_stdio(false); cin.tie(NULL)
const int h5=100000,h6=100000,h3=1e3;
const ull h9=100000000,h18=1e18;
#define tenp9 1e9
#define tenp6 1e6

#define ten5 100000
#define SIZE 100000 + 1
ll gcd(ll a,ll b){if(b==0) return a; return gcd(b,a%b);}
ll pow1(ll a,ll b,ll m)
{
  ll res=1;
  while(b>0)
  {
    if(b&1)
      res=(1ll*a*res)%m;
    b=(b>>1);
    a=(1ll*a*a)%m;
  }
  return res;
}
void f1()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    fast;
    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
    #endif
}
void solve()
{
  int n,m;cin>>n>>m;
  char res[n][m];
  for(int i=0;i<m-1;i++)
  {
    for(int j=0;j<n;j++)
    {

      res[j][i]='B';

    }

  }
  for(int i=0;i<(n-1)/2;i++)
    {
      res[i][m-1]='W';
    }
  for(int i=(n-1)/2;i<n;i++)
    {
      res[i][m-1]='B';
    }
  for01(0,n)
  {
    for02(0,m)
    {
      cout<<res[i][j];
    }cout<<endl;
  }

}
int main()
{
 f1();
 int t;
 cin>>t;
 while(t--)
  solve();
  return 0;
}


#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(0);
//   #include <ext/pb_ds/assoc_container.hpp>

//   using namespace __gnu_pbds;
using namespace std;

typedef unsigned long long int ull;
typedef long double ldb;
typedef long long int ll;

#define for01(k,n)      for (ll i=k; i<n; i++)
#define for02(k,n)      for (ll j=k; j<n; j++)
#define for03(k,n)      for (ll k=k; k<n; k++)
#define for11(k,n)      for (ll i=k; i<=n; i++)
#define for12(k,n)      for (ll j=k; j<=n; j++)
#define for13(k,n)      for (ll k=k; k<=n; k++)
#define forIT(c,it)     for(typeof(c.begin()) it = c.begin(); it != c.end(); ++it)

// 2-Way iteration possible
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))

#define pb      push_back
#define mp      make_pair

#define pf          push_front
#define popf        pop_front
#define popb        pop_back

#define vll     vector<ll>
#define vint        vector<int>
#define mll     map<ll,ll>
#define mint        map<int,int>

#define mll_it      map<ll,ll>::iterator
#define mint_it     map<int,int>::iterator

#define all(c)      c.begin(), c.end()

#define F       first
#define S       second
#define pp      pair <ll, ll>

#define lb      lower_bound

#define ub      upper_bound

#define emp     empty()
#define beg     begin()
#define en      end()
#define si      size()
#define bk      back()

#define present(c,el)   (c.find(el) != c.end())     // For containers with member function ‘find()’ (i.e. set/map, etc.)
#define cpresent(c,el)  (find(all(c),el) != c.end())    // For vectors

#define deci(n)     fixed<<setprecision(n)

#define p0(a)       cout << a << " "
#define p1(a)       cout << a << "\n"

#define mem(a,n)    memset(a, n, sizeof(a)); // n = 0 OR -1 only

#define MAX     LLONG_MAX
#define MIN     LLONG_MIN
#define MOD1        1000000007
#define MOD2        998244353
#define val1    1e6
#define BOOST       ios_base::sync_with_stdio(false); cin.tie(NULL)
const int h5=100000,h6=100000,h3=1e3;
const ull h9=100000000,h18=1e18;
#define tenp9 1e9
#define tenp6 1e6

#define ten5 100000
#define SIZE 100000 + 1
ll gcd(ll a,ll b){if(b==0) return a; return gcd(b,a%b);}
ll pow1(ll a,ll b,ll m)
{
  ll res=1;
  while(b>0)
  {
    if(b&1)
      res=(1ll*a*res)%m;
    b=(b>>1);
    a=(1ll*a*a)%m;
  }
  return res;
}
void f1()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    fast;
    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
    #endif
}
void solve()
{
  int n,m;cin>>n>>m;
  char res[n][m];
  for(int i=0;i<m-1;i++)
  {
    for(int j=0;j<n;j++)
    {
      if(i%2==0)
      res[j][i]='B';
      else
      res[j][i]='W';
    }

  }
  for(int i=0;i<(n-1)/2;i++)
    {
      res[i][m-1]='W';
    }
  for(int i=(n-1)/2;i<n;i++)
    {
      res[i][m-1]='B';
    }
  for01(0,n)
  {
    for02(0,m)
    {
      cout<<res[i][j];
    }cout<<endl;
  }

}
int main()
{
 f1();
 int t;
 cin>>t;
 while(t--)
  solve();
  return 0;
}


#include<iostream>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<algorithm>
#include<iomanip>
#include<bits/stdc++.h>
#include<cmath>
#include<string>
#include<numeric>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll long long
#define si(x)	scanf("%d",&x)
#define sl(x)	scanf("%lld",&x)
#define ss(s)	scanf("%s",s)
#define pi(x)	printf("%d\n",x)
#define pl(x)	printf("%lld\n",x)
#define ps(s)	printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)

int mpow(int base, int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int mod = 1000000007;
const int N = 3e5, M = N;
//=======================

vi g[N];
int f[N];

void solve(){
  // int a[10][10];
int n,m;
cin>>n>>m;
string s="";
for(int i=0;i<m;i++){
  if(i%2==0){
    s+='B';
  }else{
    s+='W';
  }

}
for(int i=0;i<n;i++){
  if(i==n-1){
    if(s[m-1]=='B'){
      s[m-1]='W';
    }
    else{
      s[m-1]='B';
    }
  }
  if(i%2==0){
    cout<<s<<endl;
  }
  else{
    string f=s;
    reverse(f.begin(),f.end());
    cout<<f<<endl;
  }

}

}

int main() {
    fast_cin();
    int t;
    cin>>t;
    while(t--){
      solve();
    }

return 0;
}

int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((ll)result * base) % mod;
    base = ((ll)base * base) % mod;
    exp >>= 1;
  }
  return result;
}

void ipgraph(int n, int m){
	int i, u, v;
	while(m--){
		cin>>u>>v;
		g[u-1].pb(v-1);
		g[v-1].pb(u-1);
	}
}

void dfs(int u, int par){
	for(int v:g[u]){
		if (v == par) continue;
		dfs(v, u);
	}
}


#include<iostream>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<algorithm>
#include<iomanip>
#include<bits/stdc++.h>
#include<cmath>
#include<string>
#include<numeric>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll long long
#define si(x)	scanf("%d",&x)
#define sl(x)	scanf("%lld",&x)
#define ss(s)	scanf("%s",s)
#define pi(x)	printf("%d\n",x)
#define pl(x)	printf("%lld\n",x)
#define ps(s)	printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)

int mpow(int base, int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int mod = 1000000007;
const int N = 3e5, M = N;
//=======================

vi g[N];
int f[N];

void solve(){
  // int a[10][10];
int n,m;
cin>>n>>m;
string s="";
for(int i=0;i<m;i++){
  if(i%2==0){
    s+='B';
  }else{
    s+='W';
  }

}
for(int i=0;i<n;i++){

  if(i%2==0){
    cout<<s<<endl;
  }
  else{

    if(s[m-1]=='B'){
      s[m-1]='W';
    }
    else{
      s[m-1]='B';
    }
    cout<<s<<endl;

  }

}

}

int main() {
    fast_cin();
    int t;
    cin>>t;
    while(t--){
      solve();
    }

return 0;
}

int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((ll)result * base) % mod;
    base = ((ll)base * base) % mod;
    exp >>= 1;
  }
  return result;
}

void ipgraph(int n, int m){
	int i, u, v;
	while(m--){
		cin>>u>>v;
		g[u-1].pb(v-1);
		g[v-1].pb(u-1);
	}
}

void dfs(int u, int par){
	for(int v:g[u]){
		if (v == par) continue;
		dfs(v, u);
	}
}


#include<iostream>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<algorithm>
#include<iomanip>
#include<bits/stdc++.h>
#include<cmath>
#include<string>
#include<numeric>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll long long
#define si(x)	scanf("%d",&x)
#define sl(x)	scanf("%lld",&x)
#define ss(s)	scanf("%s",s)
#define pi(x)	printf("%d\n",x)
#define pl(x)	printf("%lld\n",x)
#define ps(s)	printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y<<endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)

int mpow(int base, int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int mod = 1000000007;
const int N = 3e5, M = N;
//=======================

vi g[N];
int f[N];

void solve(){
  // int a[10][10];
int n,m;
cin>>n>>m;
string s="";
for(int i=0;i<m;i++){
  if(i%2==0){
    s+='B';
  }else{
    s+='W';
  }

}
for(int i=0;i<n;i++){

  if(i%2==0){
    cout<<s<<endl;
  }
  else{
    string f=s;
    if(f[m-1]=='B'){
      f[m-1]='W';
    }
    else{
      f[m-1]='B';
    }
    cout<<f<<endl;

  }

}

}

int main() {
    fast_cin();
    int t;
    cin>>t;
    while(t--){
      solve();
    }

return 0;
}

int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((ll)result * base) % mod;
    base = ((ll)base * base) % mod;
    exp >>= 1;
  }
  return result;
}

void ipgraph(int n, int m){
	int i, u, v;
	while(m--){
		cin>>u>>v;
		g[u-1].pb(v-1);
		g[v-1].pb(u-1);
	}
}

void dfs(int u, int par){
	for(int v:g[u]){
		if (v == par) continue;
		dfs(v, u);
	}
}


#include<iostream>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<algorithm>
#include<iomanip>
#include<bits/stdc++.h>
#include<cmath>
#include<string>
#include<numeric>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll long long
#define si(x)	scanf("%d",&x)
#define sl(x)	scanf("%lld",&x)
#define ss(s)	scanf("%s",s)
#define pi(x)	printf("%d\n",x)
#define pl(x)	printf("%lld\n",x)
#define ps(s)	printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y<<endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)

int mpow(int base, int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int mod = 1000000007;
const int N = 3e5, M = N;
//=======================

vi g[N];
int f[N];

void solve(){
  // int a[10][10];
int n,m;
cin>>n>>m;
string s="";
for(int i=0;i<m;i++){
  if(i%2==0){
    s+='B';
  }else{
    s+='W';
  }

}
for(int i=0;i<n;i++){

  if(i%2==0){
    cout<<s<<endl;
  }
  else{
    string f=s;
    if(f[m-1]=='B'){
      f[m-1]='W';
    }
    else{
      f[m-1]='B';
    }
    cout<<f<<endl;

  }

}

}

int main() {
    fast_cin();
    int t;
    cin>>t;
    while(t--){
      solve();
    }

return 0;
}


#include<iostream>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<algorithm>
#include<iomanip>
#include<bits/stdc++.h>
#include<cmath>
#include<string>
#include<numeric>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll long long
#define si(x)	scanf("%d",&x)
#define sl(x)	scanf("%lld",&x)
#define ss(s)	scanf("%s",s)
#define pi(x)	printf("%d\n",x)
#define pl(x)	printf("%lld\n",x)
#define ps(s)	printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)

int mpow(int base, int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int mod = 1000000007;
const int N = 3e5, M = N;
//=======================

vi g[N];
int f[N];

void solve(){
  // int a[10][10];
int n,m;
cin>>n>>m;
string s="";
for(int i=0;i<m;i++){
  if(i%2==0){
    s+='B';
  }else{
    s+='W';
  }

}
for(int i=0;i<n;i++){
  cout<<s<<endl;
}

}

int main() {
    fast_cin();
    int t;
    cin>>t;
    while(t--){
      solve();
    }

return 0;
}


#include<iostream>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<algorithm>
#include<iomanip>
#include<bits/stdc++.h>
#include<cmath>
#include<string>
#include<numeric>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll long long
#define si(x)	scanf("%d",&x)
#define sl(x)	scanf("%lld",&x)
#define ss(s)	scanf("%s",s)
#define pi(x)	printf("%d\n",x)
#define pl(x)	printf("%lld\n",x)
#define ps(s)	printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)

int mpow(int base, int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int mod = 1000000007;
const int N = 3e5, M = N;
//=======================

vi g[N];
int f[N];

void solve(){
  // int a[10][10];
int n,m;
cin>>n>>m;
string s="";
for(int i=0;i<n;i++){
  if(i%2==0){
    s+='B';
  }else{
    s+='W';
  }

}
for(int i=0;i<n;i++){
  if(i==n-1){
    if(s[m-1]=='B'){
      s[m-1]='W';
    }
    else{
      s[m-1]='B';
    }
  }
  if(i%2==0){
    cout<<s<<endl;
  }
  else{
    string f=s;
    reverse(f.begin(),f.end());
    cout<<f<<endl;
  }

}

}

int main() {
    fast_cin();
    int t;
    cin>>t;
    while(t--){
      solve();
    }

return 0;
}

int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((ll)result * base) % mod;
    base = ((ll)base * base) % mod;
    exp >>= 1;
  }
  return result;
}

void ipgraph(int n, int m){
	int i, u, v;
	while(m--){
		cin>>u>>v;
		g[u-1].pb(v-1);
		g[v-1].pb(u-1);
	}
}

void dfs(int u, int par){
	for(int v:g[u]){
		if (v == par) continue;
		dfs(v, u);
	}
}


#include <iostream>
using namespace std;
int main() {
  //std::cout << "Hello World!\n";
  int t;
  cin>>t;
  while(t--){
    int n,m;
    cin>>n>>m;
    for(int i=0;i<n;i++){
      for(int j=0;j<m;j++){
        if(i==0 && j==0){
          cout<<"W";
        }
        else{
          cout<<"B";
        }
      }
      cout<<endl;
    }
  }
}


#include<iostream>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<algorithm>
#include<iomanip>
#include<bits/stdc++.h>
#include<cmath>
#include<string>
#include<numeric>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll long long
#define si(x)	scanf("%d",&x)
#define sl(x)	scanf("%lld",&x)
#define ss(s)	scanf("%s",s)
#define pi(x)	printf("%d\n",x)
#define pl(x)	printf("%lld\n",x)
#define ps(s)	printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)

int mpow(int base, int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int mod = 1000000007;
const int N = 3e5, M = N;
//=======================

vi g[N];
int f[N];

void solve(){
  // int a[10][10];
int n,m;
cin>>n>>m;
string s="";
for(int i=0;i<m;i++){
  if(i%2==0){
    s+='B';
  }else{
    s+='W';
  }

}
for(int i=0;i<n;i++){
  if(i==n-1){
    if(s[m-1]=='B'){
      s[m-1]='W';
    }
    else{
      s[m-1]='B';
    }
  }
  cout<<s<<endl;
}

}

int main() {
    fast_cin();
    int t;
    cin>>t;
    while(t--){
      solve();
    }

return 0;
}

int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((ll)result * base) % mod;
    base = ((ll)base * base) % mod;
    exp >>= 1;
  }
  return result;
}

void ipgraph(int n, int m){
	int i, u, v;
	while(m--){
		cin>>u>>v;
		g[u-1].pb(v-1);
		g[v-1].pb(u-1);
	}
}

void dfs(int u, int par){
	for(int v:g[u]){
		if (v == par) continue;
		dfs(v, u);
	}
}