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