#include <bits/stdc++.h>
using namespace std;
string arr[1005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  int f = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i][0] == 'O' && arr[i][1] == 'O') {
      f = 1;
      arr[i][0] = '+';
      arr[i][1] = '+';
      break;
    } else if (arr[i][3] == 'O' && arr[i][4] == 'O') {
      f = 1;
      arr[i][3] = '+';
      arr[i][4] = '+';
      break;
    }
  }
  if (f == 0)
    cout << "NO"
         << "\n";
  else {
    cout << "YES"
         << "\n";
    for (int i = 0; i < n; i++) cout << arr[i] << "\n";
  }
  return 0;
}
