#include "bits/stdc++.h" using namespace std; int main(){ int h,w; char z; cin >> h >>w >>z; string s; if(z=='B'){ for(int i=0;i