#include <bits/stdc++.h>
using namespace std;
void GO() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
const long long N = 1e5 + 100, OO = 1e18;
int mx = -OO, mn = OO;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
char arr[1050][1050];
int main() {
  GO();
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  bool flag = 0;
  for (int i = 0; i < n; ++i) {
    if (arr[i][0] == 'O' && arr[i][1] == 'O') {
      arr[i][0] = arr[i][1] = '+';
      flag = 1;
      break;
    } else if (arr[i][3] == 'O' && arr[i][4] == 'O') {
      arr[i][3] = arr[i][4] = '+';
      flag = 1;
      break;
    }
  }
  if (flag) {
    cout << "YES" << endl;
    for (int i = 0; i < n; ++i) {
      cout << arr[i] << endl;
    }
  } else
    cout << "NO";
  return 0;
}
