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