#include <bits/stdc++.h>
using namespace std;
const int inf = (int)(1e9);
string s[1100];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> s[i];
  bool exist = 0;
  for (int i = 0; i < n; i++) {
    if (s[i][0] == 'O' && s[i][1] == 'O') {
      s[i][0] = '+';
      s[i][1] = '+';
      exist = 1;
      break;
    }
    if (s[i][3] == 'O' && s[i][4] == 'O') {
      s[i][3] = '+';
      s[i][4] = '+';
      exist = 1;
      break;
    }
  }
  if (!exist) {
    cout << "NO";
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) cout << s[i] << "\n";
  return 0;
}
