#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, y = 0;
  cin >> n;
  string ar[n];
  string newar[n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 5; j++) {
      cin >> ar[i][j];
      newar[i][j] = ar[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 4; j++) {
      if (ar[i][j] == 'O' && ar[i][j + 1] == 'O') {
        newar[i][j] = '+';
        newar[i][j + 1] = '+';
        y = 1;
        break;
      }
    }
    if (y == 1) break;
  }
  if (y == 0) {
    cout << "NO";
  } else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < 5; j++) {
        cout << newar[i][j];
      }
      cout << endl;
    }
  }
  return 0;
}
