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