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