#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 10;
const int MIN = 1e3 + 10;
char arr[MIN][MIN];
int main() {
  int n, ok = false;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 5; j++) cin >> arr[i][j];
  }
  for (int i = 0; i < n; i++) {
    if (arr[i][0] == 'O' && arr[i][1] == 'O' && !ok)
      arr[i][0] = '+', arr[i][1] = '+', ok = true;
    if (arr[i][3] == 'O' && arr[i][4] == 'O' && !ok)
      arr[i][3] = '+', arr[i][4] = '+', ok = true;
  }
  if (!ok)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < 5; j++) cout << arr[i][j];
      cout << endl;
    }
  }
  return 0;
}
