#include <bits/stdc++.h>
using namespace std;
int main() {
  int row;
  cin >> row;
  bool check = false;
  char ch[row][5];
  for (int i = 0; i < row; i++)
    for (int j = 0; j < 5; j++) cin >> ch[i][j];
  for (int i = 0; i < row; i++)
    if (ch[i][0] == 'O' && ch[i][1] == 'O') {
      cout << "YES" << endl;
      check = 1;
      ch[i][0] = '+';
      ch[i][1] = '+';
      break;
    } else if (ch[i][3] == 'O' && ch[i][4] == 'O') {
      cout << "YES" << endl;
      check = 1;
      ch[i][3] = '+';
      ch[i][4] = '+';
      break;
    }
  if (check) {
    for (int i = 0; i < row; i++) {
      for (int j = 0; j < 5; j++) cout << ch[i][j];
      cout << endl;
    }
  } else
    cout << "NO" << endl;
}
