#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  string arr[a];
  bool b = 0, bb = 0;
  for (int e = 0; e < a; e++) {
    cin >> arr[e];
    if ((arr[e][3] == arr[e][4] && arr[e][3] == 'O') ||
        (arr[e][0] == arr[e][1] && arr[e][1] == 'O'))
      b = 1;
  }
  if (b) {
    cout << "YES" << endl;
    for (int e = 0; e < a; e++) {
      if (!bb && arr[e][0] == arr[e][1] && arr[e][1] == 'O') {
        arr[e][0] = '+';
        arr[e][1] = '+';
        bb = 1;
      } else if (!bb && arr[e][3] == arr[e][4] && arr[e][3] == 'O') {
        arr[e][4] = '+';
        arr[e][3] = '+';
        bb = 1;
      }
      cout << arr[e] << endl;
    }
  } else
    cout << "NO";
  return 0;
}
