#include <bits/stdc++.h>
using namespace std;
int n;
char s[5005][5005];
vector<pair<char, char> > ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= 5; ++j) {
      scanf("%1s", &s[i][j]);
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= 4; ++j) {
      if (s[i][j] != '|' && s[i][j + 1] != '|') {
        ans.push_back(make_pair(s[i][j], s[i][j + 1]));
      }
    }
  }
  bool ok = false;
  for (int i = 0; i <= (int)ans.size() - 1; ++i) {
    if (!ok && ans[i].first == 'O' && ans[i].second == 'O') {
      ans[i].first = '+';
      ans[i].second = '+';
      ok = true;
    }
  }
  if (!ok)
    puts("NO");
  else {
    puts("YES");
    for (int i = 0; i <= (int)ans.size() - 1; ++i) {
      cout << ans[i].first << ans[i].second;
      if (i % 2 == 0)
        cout << '|';
      else
        cout << endl;
    }
  }
  return 0;
}
