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