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