#include <bits/stdc++.h>
using namespace std;
string a[100010 + 5];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long int i, n;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  long long int flag = 0;
  for (i = 1; i <= n; i++) {
    string second = a[i];
    if (second[0] == 'O' && second[1] == 'O') {
      second[0] = second[1] = '+';
      a[i] = second;
      flag = 1;
      break;
    } else if (second[3] == 'O' && second[4] == 'O') {
      second[3] = second[4] = '+';
      a[i] = second;
      flag = 1;
      break;
    }
  }
  if (flag == 0)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (i = 1; i <= n; i++) cout << a[i] << endl;
  }
  return 0;
}
