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