#include <bits/stdc++.h>
using namespace std;
void printRows(char arr[][5], int n);
int main() {
  int n = 0;
  string temp;
  cin >> n;
  char rows[n][5];
  for (int i = 0; i < n; i++) {
    cin >> temp;
    for (int j = 0; j < 5; j++) {
      char char_temp = temp[j];
      rows[i][j] = char_temp;
    }
  }
  for (int i = 0; i < n; i++) {
    if (rows[i][0] == 'O' && rows[i][1] == 'O') {
      cout << "YES" << endl;
      rows[i][0] = '+';
      rows[i][1] = '+';
      printRows(rows, n);
      return 0;
    } else if (rows[i][3] == 'O' && rows[i][4] == 'O') {
      cout << "YES" << endl;
      rows[i][3] = '+';
      rows[i][4] = '+';
      printRows(rows, n);
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
void printRows(char arr[][5], int n) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 5; j++) {
      cout << arr[i][j];
    }
    cout << endl;
  }
}
