#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    char a[n][5];
    bool yn = 0;
    for (int i = 0; i < n; i++) {
      scanf(" %c%c%c%c%c", &a[i][0], &a[i][1], &a[i][2], &a[i][3], &a[i][4]);
    }
    for (int i = 0; i < n; i++) {
      if (a[i][0] == 'O' && a[i][1] == 'O') {
        a[i][0] = '+';
        a[i][1] = '+';
        yn = 1;
        break;
      } else if (a[i][3] == 'O' && a[i][4] == 'O') {
        a[i][3] = '+';
        a[i][4] = '+';
        yn = 1;
        break;
      }
    }
    if (yn == 1) {
      printf("YES\n");
      for (int i = 0; i < n; i++) {
        printf("%c%c%c%c%c\n", a[i][0], a[i][1], a[i][2], a[i][3], a[i][4]);
      }
    } else {
      printf("NO\n");
    }
  }
}
