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