Problem: There are many interesting tasks on domino tilings. For example, an interesting fact is known. Let us take a standard chessboard (8 × 8) and cut exactly two squares out of it. It turns out that the resulting board can always be tiled using dominoes 1 × 2, if the two cut out squares are of the same color, otherwise it is impossible. 

Petya grew bored with dominoes, that's why he took a chessboard (not necessarily 8 × 8), cut some squares out of it and tries to tile it using triminoes. Triminoes are reactangles 1 × 3 (or 3 × 1, because triminoes can be rotated freely), also the two extreme squares of a trimino are necessarily white and the square in the middle is black. The triminoes are allowed to put on the chessboard so that their squares matched the colors of the uncut squares of the chessboard, and also the colors must match: the black squares must be matched with the black ones only and the white ones — with the white squares. The triminoes must not protrude above the chessboard or overlap each other. All the uncut squares of the board must be covered with triminoes. 

Help Petya find out if it is possible to tile his board using triminos in the described way and print one of the variants of tiling.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 1000) — the board size. Next n lines contain m symbols each and represent the board description. If some position contains ".", then the square in this position has been cut out. Symbol "w" stands for a white square, "b" stands for a black square. It is guaranteed that through adding the cut squares can result in a correct chessboard (i.e. with alternating black and white squares), thought, perhaps, of a non-standard size.

Output

If at least one correct tiling exists, in the first line print "YES" (without quotes), and then — the tiling description. The description must contain n lines, m symbols in each. The cut out squares, as well as in the input data, are marked by ".". To denote triminoes symbols "a", "b", "c", "d" can be used, and all the three squares of each trimino must be denoted by the same symbol. If two triminoes share a side, than they must be denoted by different symbols. Two triminoes not sharing a common side can be denoted by one and the same symbol (c.f. sample).

If there are multiple correct ways of tiling, it is allowed to print any. If it is impossible to tile the board using triminoes or the correct tiling, for which four symbols "a", "b", "c", "d" would be enough, doesn't exist, print "NO" (without quotes) in the first line.

Examples

Input

6 10
.w.wbw.wbw
wbwbw.w.w.
bw.wbwbwbw
w.wbw.wbwb
...wbw.w.w
..wbw.wbw.


Output

YES
.a.aaa.ccc
baccc.c.a.
ba.dddcbab
b.aaa.cbab
...bbb.b.b
..ccc.ddd.

Input

2 2
wb
bw


Output

NO


Input

1 3
wbw


Output

YES
bbb


Input

1 3
...


Output

YES
...

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int P = 1e9 + 7;
int add(int a, int b) {
  if ((a += b) >= P) a -= P;
  return a;
}
int sub(int a, int b) {
  if ((a -= b) < 0) a += P;
  return a;
}
int mul(int a, int b) { return 1ll * a * b % P; }
int kpow(int a, int b) {
  int r = 1;
  for (; b; b >>= 1, a = mul(a, a)) {
    if (b & 1) r = mul(r, a);
  }
  return r;
}
const int N = 1010;
int n, m, tim;
int res[N][N];
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
vector<pair<int, int> > q;
bool vis[N][N];
char s[N][N];
bool check(int i, int j, char c) {
  return 1 <= i && i <= n && 1 <= j && j <= m && s[i][j] == c && !res[i][j];
}
int calc(int i, int j) {
  if (s[i][j] == 'w') {
    int c1 = check(i - 1, j, 'b') + check(i - 2, j, 'w');
    int c2 = check(i + 1, j, 'b') + check(i + 2, j, 'w');
    int c3 = check(i, j - 1, 'b') + check(i, j - 2, 'w');
    int c4 = check(i, j + 1, 'b') + check(i, j + 2, 'w');
    return (c1 == 2) + (c2 == 2) + (c3 == 2) + (c4 == 2);
  } else {
    int c1 = check(i - 1, j, 'w') + check(i + 1, j, 'w');
    int c2 = check(i, j - 1, 'w') + check(i, j + 1, 'w');
    return (c1 == 2) + (c2 == 2);
  }
}
bool gao(int i1, int j1, char c1, int i2, int j2, char c2, int i0 = 0,
         int j0 = 0) {
  if (!check(i1, j1, c1) || !check(i2, j2, c2)) return 0;
  bool mex[5] = {0};
  if (i0) i1 = i0, j1 = j0;
  if (i1 > i2) swap(i1, i2);
  if (j1 > j2) swap(j1, j2);
  ++tim;
  for (int i = (i1); i < (i2 + 1); i++)
    for (int j = (j1); j < (j2 + 1); j++) res[i][j] = tim;
  for (int i = (i1); i < (i2 + 1); i++)
    for (int j = (j1); j < (j2 + 1); j++)
      for (int k = (0); k < (4); k++)
        for (int c = (1); c < (3); c++) {
          int x = i + dx[k] * c;
          int y = j + dy[k] * c;
          if (1 <= x && x <= n && 1 <= y && y <= m && !vis[x][y] &&
              !res[x][y] && calc(x, y) == 1) {
            vis[x][y] = 1;
            q.push_back(make_pair(x, y));
          }
        }
  return 1;
}
void Set(int i, int j) {
  if (s[i][j] == 'w') {
    if (gao(i - 1, j, 'b', i - 2, j, 'w', i, j)) return;
    if (gao(i + 1, j, 'b', i + 2, j, 'w', i, j)) return;
    if (gao(i, j - 1, 'b', i, j - 2, 'w', i, j)) return;
    if (gao(i, j + 1, 'b', i, j + 2, 'w', i, j)) return;
  } else {
    if (gao(i - 1, j, 'w', i + 1, j, 'w')) return;
    if (gao(i, j - 1, 'w', i, j + 1, 'w')) return;
  }
}
bool solve() {
  for (int i = (1); i < (n + 1); i++)
    for (int j = (1); j < (m + 1); j++) {
      if (s[i][j] == '.') {
        vis[i][j] = 1;
      } else {
        int t = calc(i, j);
        if (t == 1) {
          q.push_back(make_pair(i, j));
          vis[i][j] = 1;
        } else if (t == 0) {
          return 0;
        }
      }
    }
  for (int i = (0); i < ((int)q.size()); i++) {
    int x = q[i].first, y = q[i].second;
    if (res[x][y]) continue;
    int t = calc(x, y);
    if (t == 0) return 0;
    Set(x, y);
  }
  return 1;
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  cin >> n >> m;
  for (int i = (1); i < (n + 1); i++) cin >> (s[i] + 1);
  tim = 4;
  if (solve()) {
    cout << "YES"
         << "\n";
    for (int i = (1); i < (n + 1); i++)
      for (int j = (1); j < (m + 1); j++)
        if (res[i][j] > 4) {
          int i1 = i, i2 = i, j1 = j, j2 = j;
          if (res[i][j] == res[i + 1][j])
            i2 = i + 2;
          else
            j2 = j + 2;
          bool mex[5] = {0};
          for (int x = (i1); x < (i2 + 1); x++)
            for (int y = (j1); y < (j2 + 1); y++)
              for (int k = (0); k < (4); k++) {
                int nx = x + dx[k], ny = y + dy[k];
                if (1 <= nx && nx <= n && 1 <= ny && ny <= m &&
                    res[nx][ny] <= 4)
                  mex[res[nx][ny]] = 1;
              }
          for (int k = (1); k < (5); k++)
            if (!mex[k]) {
              for (int x = (i1); x < (i2 + 1); x++)
                for (int y = (j1); y < (j2 + 1); y++) res[x][y] = k;
              break;
            }
        }
    for (int i = (1); i < (n + 1); i++) {
      for (int j = (1); j < (m + 1); j++)
        cout << (res[i][j] ? (char)('a' + res[i][j] - 1) : '.');
      cout << "\n";
    }
  } else {
    cout << "NO"
         << "\n";
  }
  return 0;
}