#include <bits/stdc++.h>
int main() {
  int t, i, j, a = 0;
  char s[1000][6];
  scanf("%d", &t);
  for (i = 0; i < t; i++) {
    scanf("%s", s[i]);
    if (a != 1) {
      for (j = 0; j < 4; j++) {
        if (s[i][j] == 'O' && s[i][j + 1] == 'O') {
          a = 1;
          s[i][j] = s[i][j + 1] = '+';
          break;
        } else
          a = 0;
      }
    }
  }
  if (a == 1) {
    printf("YES\n");
    for (i = 0; i < t; i++) {
      printf("%s\n", s[i]);
    }
  } else
    printf("NO\n");
  return 0;
}
