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