#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  char arr[n][5];
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < 5; j++) {
      cin >> arr[i][j];
    }
  }
  long long c = 0;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < 4; j++) {
      if (arr[i][j] == 'O' && arr[i][j + 1] == 'O' && c == 0) {
        arr[i][j] = '+';
        arr[i][j + 1] = '+';
        c++;
      }
    }
    if (c >= 1) {
      cout << "YES"
           << "\n";
      break;
    }
  }
  if (c == 0) {
    cout << "NO";
    return 0;
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < 5; j++) {
      cout << arr[i][j];
    }
    cout << "\n";
  }
}
