#include <bits/stdc++.h>
using namespace std;
char s[1010][6];
int main() {
  int n, x = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s[i][0] >> s[i][1] >> s[i][2] >> s[i][3] >> s[i][4];
    if (s[i][0] == 'O' && s[i][1] == 'O' && x == 0) {
      x++;
      s[i][0] = '+';
      s[i][1] = '+';
    } else if (s[i][3] == 'O' && s[i][4] == 'O' && x == 0) {
      x++;
      s[i][3] = '+';
      s[i][4] = '+';
    }
  }
  if (x == 0) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) {
    cout << s[i][0] << s[i][1] << s[i][2] << s[i][3] << s[i][4] << endl;
  }
}
