#include <bits/stdc++.h>
using namespace std;
int i, j, k, m, n;
int main() {
  scanf("%d%d\n", &n, &m);
  char ch;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      scanf("%c", &ch);
      if (ch == '-')
        cout << ch;
      else if ((i + j) % 2)
        cout << 'W';
      else
        cout << 'B';
    }
    cout << endl;
    scanf("\n");
  }
  return 0;
}
