#include <bits/stdc++.h>
using namespace std;
string x[1001];
int main() {
  int rows;
  cin >> rows;
  int flag = 0;
  for (int i = 0; i < rows; i++) {
    cin >> x[i];
  }
  for (int i = 0; i < rows; i++) {
    if (x[i][0] == 'O' && x[i][1] == 'O') {
      x[i][0] = '+';
      x[i][1] = '+';
      flag = 1;
      break;
    } else if (x[i][3] == 'O' && x[i][4] == 'O') {
      x[i][3] = '+';
      x[i][4] = '+';
      flag = 1;
      break;
    }
  }
  if (flag == 1) {
    cout << "YES" << endl;
    for (int i = 0; i < rows; i++) {
      cout << x[i] << endl;
    }
  } else
    cout << "NO";
  return 0;
}
