#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
int main() {
  int n, c = 0;
  cin >> n;
  vector<string> v;
  string s;
  for (int i = 0; i < n; i++) {
    cin >> s;
    v.push_back(s);
  }
  for (int i = 0; i < n; i++) {
    if (v[i][0] == 'O' && v[i][1] == 'O') {
      c++;
      v[i][0] = '+';
      v[i][1] = '+';
      break;
    } else if (v[i][3] == 'O' && v[i][4] == 'O') {
      v[i][3] = '+';
      v[i][4] = '+';
      c++;
      break;
    }
  }
  if (c > 0) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      cout << v[i] << endl;
    }
  } else
    cout << "NO";
  return 0;
}
