#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char a[n][5];
  char prev = ' ';
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 5; j++) {
      cin >> a[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    prev = ' ';
    for (int j = 0; j < 5; j++) {
      if (prev == 'O' && prev == a[i][j]) {
        cout << "YES" << endl;
        a[i][j] = '+';
        a[i][j - 1] = '+';
        for (int i = 0; i < n; i++) {
          for (int j = 0; j < 5; j++) {
            cout << a[i][j];
          }
          cout << endl;
        }
        exit(0);
      }
      prev = a[i][j];
    }
  }
  cout << "NO";
}
