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