#include <bits/stdc++.h>
int main() {
  int n, i, j, c = 0, k, l, r = 0, s = 0, t = 0;
  scanf("%d", &n);
  char ch[n][5];
  for (i = 0; i < n; i++) {
    scanf("%5s", ch[i]);
  }
  for (k = 0; k < n; k++) {
    if (ch[k][0] == 'O' && ch[k][1] == 'O' ||
        ch[k][3] == 'O' && ch[k][4] == 'O')
      t++;
  }
  if (t > 0)
    printf("YES\n");
  else if (t == 0)
    printf("NO");
  for (l = 0; l < n; l++) {
    if (t == 0) break;
    if (s == 0) {
      if (ch[l][0] == 'O' && ch[l][1] == 'O' && r == 0) {
        printf("++");
        s++;
      } else if (ch[l][0] == 'O' && ch[l][1] == 'O' && r > 0)
        printf("%c%c", ch[l][0], ch[l][1]);
      else if (ch[l][0] != 'O' && ch[l][1] != 'O')
        printf("%c%c", ch[l][0], ch[l][1]);
      else
        printf("%c%c", ch[l][0], ch[l][1]);
    } else
      printf("%c%c", ch[l][0], ch[l][1]);
    printf("|");
    if (r == 0) {
      if (ch[l][3] == 'O' && ch[l][4] == 'O') {
        if (s > 0)
          printf("%c%c", ch[l][3], ch[l][4]);
        else if (s == 0) {
          printf("++");
          r++;
        }
      } else if (ch[l][3] != 'O' && ch[l][4] != 'O')
        printf("%c%c", ch[l][3], ch[l][4]);
      else
        printf("%c%c", ch[l][3], ch[l][4]);
    } else if (r > 0)
      printf("%c%c", ch[l][3], ch[l][4]);
    printf("\n");
  }
  return 0;
}
