#include <bits/stdc++.h>
int main() {
  int n, i, k, flag = 0, m;
  char ch[1001][5];
  while (~scanf("%d", &n)) {
    for (i = 0; i < n; i++) scanf("%s", &ch[i]);
    for (k = 0; k < n; k++) {
      if (ch[k][0] == 'O' && ch[k][1] == 'O') {
        ch[k][0] = '+';
        ch[k][1] = '+';
        flag = 1;
        printf("YES\n");
        for (m = 0; m < n; m++) {
          for (i = 0; i < 5; i++) printf("%c", ch[m][i]);
          printf("\n");
        }
        break;
      } else if (ch[k][3] == 'O' && ch[k][4] == 'O') {
        ch[k][3] = '+';
        ch[k][4] = '+';
        flag = 1;
        printf("YES\n");
        for (m = 0; m < n; m++) {
          for (i = 0; i < 5; i++) printf("%c", ch[m][i]);
          printf("\n");
        }
        break;
      }
    }
    if (!flag) printf("NO\n");
  }
  return 0;
}
