#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  string s[6900];
  int f = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    if (!f && s[i][0] == 'O' && s[i][1] == 'O') {
      s[i][0] = s[i][1] = '+';
      f = 1;
    }
    if (!f && s[i][3] == 'O' && s[i][4] == 'O') {
      s[i][3] = s[i][4] = '+';
      f = 1;
    }
  }
  if (f) {
    puts("YES");
    for (int i = 0; i < n; i++) cout << s[i] << endl;
  } else
    puts("NO");
  return 0;
}
