#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[200][150];
  int n, m, i, c, p;
  while (cin >> n) {
    for (i = 1; i <= n; i++) {
      cin >> s[i];
    }
    p = 0;
    c = 0;
    for (i = 1; i <= n; i++) {
      if (s[i][0] == 'O' && s[i][1] == 'O') {
        p = 1;
        s[i][0] = '+';
        s[i][1] = '+';
        break;
      } else if (s[i][3] == 'O' && s[i][4] == 'O') {
        p = 1;
        s[i][3] = '+';
        s[i][4] = '+';
        break;
      }
    }
    if (p == 1) {
      cout << "YES" << endl;
      for (i = 1; i <= n; i++) {
        cout << s[i] << endl;
      }
    } else
      cout << "NO" << endl;
  }
}
