#include <bits/stdc++.h>
using namespace std;
ifstream fin("input.txt");
ofstream fout("output.txt");
bool isPrime(int x) {
  if (x <= 4 || x % 2 == 0 || x % 3 == 0) return x == 2 || x == 3;
  for (int i = 5; i * i <= x; i += 6)
    if (x % i == 0 || x % (i + 2) == 0) return 0;
  return 1;
}
inline void boostIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  boostIO();
  int n;
  cin >> n;
  vector<string> A(n);
  bool flag = 0;
  for (long long int i = 0; i < (n); ++i) {
    cin >> A[i];
    if (A[i][0] == A[i][1] && A[i][0] == 'O' && flag == 0) {
      A[i][0] = '+';
      A[i][1] = '+';
      flag = 1;
    }
    if (A[i][3] == A[i][4] && A[i][3] == 'O' && flag == 0) {
      A[i][3] = '+';
      A[i][4] = '+';
      flag = 1;
    }
  }
  if (flag == 1)
    cout << "YES" << endl;
  else {
    cout << "NO" << endl;
    return 0;
  }
  for (long long int i = 0; i < (n); ++i) cout << A[i] << endl;
  return 0;
}
