#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, j = 0, i;
  cin >> n;
  vector<string> a(n);
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (j == 0 && a[i][0] == 'O' && a[i][1] == 'O') {
      a[i][0] = '+';
      a[i][1] = '+';
      j = 1;
    } else if (j == 0 && a[i][3] == 'O' && a[i][4] == 'O') {
      a[i][3] = '+';
      a[i][4] = '+';
      j = 1;
    }
  }
  if (j == 0) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (i = 0; i < n; i++) {
    cout << a[i] << endl;
  }
  return 0;
}
