#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j;
  cin >> n;
  char a[n + 3][8];
  int f = 0;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    if (f == 0)
      if ((a[i][0] == 'O' && a[i][1] == 'O')) {
        f = 1;
        a[i][0] = '+';
        a[i][1] = '+';
      }
    if (f == 0) {
      if ((a[i][4] == 'O' && a[i][3] == 'O')) {
        f = 1;
        a[i][3] = '+';
        a[i][4] = '+';
      }
    }
  }
  if (f == 0) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (i = 1; i <= n; i++) {
      cout << a[i] << endl;
    }
  }
}
