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