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