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;
char Get() {
  char c;
  while (c = getchar(), c != 'b' && c != 'w' && c != '.')
    ;
  return c;
}
int Count, Total, Top;
vector<int> G[666666];
int Index[666666], Low[666666], Stack[666666], Color[666666];
bool Visited[666666], Status[666666];
vector<int> List[666666];
void Add(int X, int Y) { G[X].push_back(Y); }
int F(int Mask, int X) {
  if (X >= 'a' && X <= 'd') Mask &= ~(1 << (X - 97));
  return Mask;
}
char Letter(int X) {
  if (X == 1) return 'a';
  if (X == 2) return 'b';
  if (X == 4) return 'c';
  if (X == 8) return 'd';
}
void DFS(int X) {
  Index[X] = Low[X] = Count++;
  Visited[X] = Status[X] = true;
  Stack[Top++] = X;
  for (int i = 0; i < G[X].size(); i++) {
    int Y = G[X][i];
    if (!Visited[Y]) {
      DFS(Y);
      Low[X] = min(Low[X], Low[Y]);
    } else if (Status[Y])
      Low[X] = min(Low[X], Index[Y]);
  }
  if (Low[X] == Index[X]) {
    while (Status[X]) {
      int V = Stack[--Top];
      List[Total].push_back(V);
      Status[V] = false;
      Color[V] = Total;
    }
    Total++;
  }
}
int main() {
  int R, C;
  scanf("%d%d", &R, &C);
  static char Map[1000][1000];
  int Black = 0, White = 0;
  for (int i = 0; i < R; i++)
    for (int j = 0; j < C; j++) {
      Map[i][j] = Get();
      if (Map[i][j] == 'b') Black++;
      if (Map[i][j] == 'w') White++;
    }
  if (Black * 2 != White) {
    printf("NO\n");
    return 0;
  }
  static int Number[1000][1000], P[333333], Q[333333];
  int N = 0;
  for (int i = 0; i < R; i++)
    for (int j = 0; j < C; j++)
      if (Map[i][j] != 'b')
        Number[i][j] = -1;
      else {
        P[N] = i;
        Q[N] = j;
        int X = Number[i][j] = N++;
        if (!j || j == C - 1 || Map[i][j - 1] != 'w' || Map[i][j + 1] != 'w')
          Add(X * 2, X * 2 + 1);
        if (!i || i == R - 1 || Map[i - 1][j] != 'w' || Map[i + 1][j] != 'w')
          Add(X * 2 + 1, X * 2);
      }
  for (int i = 0; i < R; i++)
    for (int j = 0; j < C; j++)
      if (Map[i][j] == 'w') {
        int a = i ? Number[i - 1][j] : -1;
        int b = j ? Number[i][j - 1] : -1;
        int c = (j == C - 1) ? -1 : Number[i][j + 1];
        int d = (i == R - 1) ? -1 : Number[i + 1][j];
        if (a != -1 && b != -1) {
          Add(a * 2 + 1, b * 2 + 1);
          Add(b * 2, a * 2);
        }
        if (a != -1 && c != -1) {
          Add(a * 2 + 1, c * 2 + 1);
          Add(c * 2, a * 2);
        }
        if (d != -1 && b != -1) {
          Add(d * 2 + 1, b * 2 + 1);
          Add(b * 2, d * 2);
        }
        if (d != -1 && c != -1) {
          Add(d * 2 + 1, c * 2 + 1);
          Add(c * 2, d * 2);
        }
        if (a != -1 && d != -1) {
          Add(a * 2 + 1, d * 2);
          Add(d * 2 + 1, a * 2);
        }
        if (b != -1 && c != -1) {
          Add(b * 2, c * 2 + 1);
          Add(c * 2, b * 2 + 1);
        }
      }
  memset(Visited, 0, sizeof(Visited));
  memset(Status, 0, sizeof(Status));
  Count = Total = Top = 0;
  for (int i = 0; i < N * 2; i++)
    if (!Visited[i]) DFS(i);
  for (int i = 0; i < N; i++)
    if (Color[i * 2] == Color[i * 2 + 1]) {
      printf("NO\n");
      return 0;
    }
  static vector<int> g[666666];
  static int Degree[666666];
  memset(Degree, 0, sizeof(Degree));
  for (int i = 0; i < N * 2; i++)
    for (int j = 0; j < G[i].size(); j++)
      if (Color[i] != Color[G[i][j]]) {
        g[Color[G[i][j]]].push_back(Color[i]);
        Degree[Color[i]]++;
      }
  for (int i = Top = 0; i < Total; i++)
    if (!Degree[i]) Stack[Top++] = i;
  static bool Bad[666666], Choose[666666];
  memset(Bad, 0, sizeof(Bad));
  memset(Choose, 0, sizeof(Choose));
  while (Top) {
    int V = Stack[--Top];
    if (!Bad[V]) {
      for (int i = 0; i < List[V].size(); i++) Choose[List[V][i]] = true;
      Bad[Color[List[V][0] ^ 1]] = true;
    } else
      for (int i = 0; i < g[V].size(); i++) Bad[g[V][i]] = true;
    for (int i = 0; i < g[V].size(); i++)
      if (!--Degree[g[V][i]]) Stack[Top++] = g[V][i];
  }
  for (int i = 0; i < N; i++)
    if (Choose[i * 2])
      Number[P[i]][Q[i] - 1] = Number[P[i]][Q[i] + 1] = i;
    else
      Number[P[i] - 1][Q[i]] = Number[P[i] + 1][Q[i]] = i;
  static char Ans[1000][1000];
  for (int i = 0; i < R; i++)
    for (int j = 0; j < C; j++) Ans[i][j] = '.';
  for (int i = 0; i < R; i++)
    for (int j = 0; j < C; j++)
      if (Number[i][j] != -1 && Ans[i][j] == '.')
        if (j + 1 < C && Number[i][j] == Number[i][j + 1]) {
          int Mask = 15;
          if (i) {
            Mask = F(Mask, Ans[i - 1][j]);
            Mask = F(Mask, Ans[i - 1][j + 1]);
            Mask = F(Mask, Ans[i - 1][j + 2]);
          }
          if (j) Mask = F(Mask, Ans[i][j - 1]);
          if (j + 3 < C) Mask = F(Mask, Ans[i][j + 3]);
          Ans[i][j] = Ans[i][j + 1] = Ans[i][j + 2] = Letter(Mask & -Mask);
        } else {
          int Mask = 15;
          if (i) Mask = F(Mask, Ans[i - 1][j]);
          if (j) {
            Mask = F(Mask, Ans[i][j - 1]);
            if (i + 1 < R) F(Mask, Ans[i + 1][j - 1]);
            if (i + 2 < R) F(Mask, Ans[i + 2][j - 1]);
          }
          if (j + 1 < C) {
            Mask = F(Mask, Ans[i][j + 1]);
            if (i + 1 < R) F(Mask, Ans[i + 1][j + 1]);
            if (i + 2 < R) F(Mask, Ans[i + 2][j + 1]);
          }
          Ans[i][j] = Ans[i + 1][j] = Ans[i + 2][j] = Letter(Mask & -Mask);
        }
  printf("YES\n");
  for (int i = 0; i < R; i++) {
    for (int j = 0; j < C; j++) putchar(Ans[i][j]);
    putchar('\n');
  }
  return 0;
}