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