#include <bits/stdc++.h>
int p, n, s[1005][2][2];
char c;
void print(int i, int j, int k) {
  if (!s[i][j][k])
    printf("O");
  else if (s[i][j][k] == 1)
    printf("X");
  else
    printf("+");
}
int main() {
  scanf("%d", &n);
  getchar();
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 2; j++) {
      for (int k = 0; k < 2; k++) {
        c = getchar();
        if (c == 'X') s[i][j][k] = 1;
      }
      if (!p && !s[i][j][0] && !s[i][j][1]) s[i][j][0] = s[i][j][1] = 2, p = 1;
      getchar();
    }
  }
  if (!p)
    printf("NO");
  else {
    printf("YES\n");
    for (int i = 0; i < n; i++) {
      print(i, 0, 0), print(i, 0, 1);
      printf("|");
      print(i, 1, 0), print(i, 1, 1);
      printf("\n");
    }
  }
  return 0;
}
