#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10005;
int A[MAXN][10];
int n;
int main() {
  scanf("%d", &n);
  getchar();
  char op[10];
  for (int i = 1; i <= n; i++) {
    scanf("%s", op);
    if (op[0] == 'O')
      A[i][1] = 0;
    else
      A[i][1] = 1;
    if (op[1] == 'O')
      A[i][2] = 0;
    else
      A[i][2] = 1;
    if (op[3] == 'O')
      A[i][3] = 0;
    else
      A[i][3] = 1;
    if (op[4] == 'O')
      A[i][4] = 0;
    else
      A[i][4] = 1;
  }
  int seatx, seaty;
  for (seatx = 1; seatx <= n; seatx++) {
    if (A[seatx][1] == 0 && A[seatx][2] == 0) {
      seaty = 1;
      break;
    }
    if (A[seatx][3] == 0 && A[seatx][4] == 0) {
      seaty = 3;
      break;
    }
  }
  if (seatx == n + 1) {
    printf("NO\n");
  } else {
    printf("YES\n");
    for (int i = 1; i <= n; i++) {
      if (i != seatx) {
        for (int p = 1; p <= 2; p++) {
          if (A[i][p] == 0)
            putchar('O');
          else
            putchar('X');
        }
        putchar('|');
        for (int p = 3; p <= 4; p++) {
          if (A[i][p] == 0)
            putchar('O');
          else
            putchar('X');
        }
        putchar('\n');
      } else {
        if (seaty == 1) {
          printf("++|");
          for (int p = 3; p <= 4; p++) {
            if (A[i][p] == 0)
              putchar('O');
            else
              putchar('X');
          }
          putchar('\n');
        } else {
          for (int p = 1; p <= 2; p++) {
            if (A[i][p] == 0)
              putchar('O');
            else
              putchar('X');
          }
          printf("|++\n");
        }
      }
    }
  }
  return 0;
}
