#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, r;
  char a[1050][1050];
  while (~scanf("%d", &n)) {
    t = 0;
    r = 0;
    memset(a, 'q', sizeof(char) * 1050);
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= 5; j++) {
        scanf(" %c", &a[i][j]);
      }
    }
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= 5; j++) {
        if ((a[i][j] == 'O' && a[i][j - 1] == 'O' && j != 5 * i + 1) ||
            (a[i][j] == 'O' && a[i][j + 1] == 'O' && j != 5 * i)) {
          t = 1;
          break;
        }
      }
    }
    if (t == 1)
      printf("YES\n");
    else {
      printf("NO\n");
      return 0;
    }
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= 5; j++) {
        if ((a[i][j] == 'O' && a[i][j - 1] == 'O' && j != 5 * i + 1) ||
            (a[i][j] == 'O' && a[i][j + 1] == 'O' && j != 5 * i)) {
          if (r == 2)
            printf("%c", a[i][j]);
          else {
            printf("+");
            r++;
          }
        } else
          printf("%c", a[i][j]);
      }
      printf("\n");
    }
  }
}
