#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  char str[1010][10];
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("\n");
    for (j = 1; j <= 5; j++) scanf("%c", &str[i][j]);
  }
  int ans = 0;
  for (i = 1; i <= n; i++) {
    if (str[i][1] == 'O' && str[i][2] == 'O') {
      str[i][1] = '+';
      str[i][2] = '+';
      ans = 1;
      break;
    }
    if (str[i][4] == 'O' && str[i][5] == 'O') {
      str[i][4] = '+';
      str[i][5] = '+';
      ans = 1;
      break;
    }
  }
  if (ans == 0) {
    printf("NO");
    return 0;
  }
  printf("YES\n");
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= 5; j++) printf("%c", str[i][j]);
    printf("\n");
  }
  return 0;
}
