#include <bits/stdc++.h>
#define MP make_pair
#define PB push_back
#define int long long
#define st first
#define nd second
#define rd third
#define FOR(i, a, b) for(int i =(a); i <=(b); ++i)
#define RE(i, n) FOR(i, 1, n)
#define FORD(i, a, b) for(int i = (a); i >= (b); --i)
#define REP(i, n) for(int i = 0;i <(n); ++i)
#define VAR(v, i) __typeof(i) v=(i)
#define FORE(i, c) for(VAR(i, (c).begin()); i != (c).end(); ++i)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define __builtin_ctz __builtin_ctzll
#define __builtin_clz __builtin_clzll
#define __builtin_popcount __builtin_popcountll
using namespace std;
template<typename TH> void _dbg(const char* sdbg, TH h) { cerr<<sdbg<<"="<<h<<"\n"; }
template<typename TH, typename... TA> void _dbg(const char* sdbg, TH h, TA... t) {
while(*sdbg != ',') { cerr<<*sdbg++; } cerr<<"="<<h<<","; _dbg(sdbg+1, t...);
}
#ifdef LOCAL
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#define debugv(x) {{cerr <<#x <<" = "; FORE(itt, (x)) cerr <<*itt <<", "; cerr <<"\n"; }}
#else
#define debug(...) (__VA_ARGS__)
#define debugv(x)
#define cerr if(0)cout
#endif
#define next ____next
#define prev ____prev
#define left ____left
#define hash ____hash
typedef long long ll;
typedef long double LD;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VLL;
typedef vector<pair<int, int> > VPII;
typedef vector<pair<ll, ll> > VPLL;
template<class C> void mini(C&a4, C b4){a4=min(a4, b4); }
template<class C> void maxi(C&a4, C b4){a4=max(a4, b4); }
template<class T1, class T2>
ostream& operator<< (ostream &out, pair<T1, T2> pair) { return out << "(" << pair.first << ", " << pair.second << ")";}
template<class A, class B, class C> struct Triple { A first; B second; C third;
bool operator<(const Triple& t) const { if (st != t.st) return st < t.st; if (nd != t.nd) return nd < t.nd; return rd < t.rd; } };
template<class T> void ResizeVec(T&, vector<int>) {}
template<class T> void ResizeVec(vector<T>& vec, vector<int> sz) {
vec.resize(sz[0]); sz.erase(sz.begin()); if (sz.empty()) { return; }
for (T& v : vec) { ResizeVec(v, sz); }
}
typedef Triple<int, int, int> TIII;
template<class A, class B, class C>
ostream& operator<< (ostream &out, Triple<A, B, C> t) { return out << "(" << t.st << ", " << t.nd << ", " << t.rd << ")"; }
template<class T> ostream& operator<<(ostream& out, vector<T> vec) { out<<"("; for (auto& v: vec) out<<v<<", "; return out<<")"; }
template<class T> ostream& operator<<(ostream& out, set<T> vec) { out<<"("; for (auto& v: vec) out<<v<<", "; return out<<")"; }
template<class L, class R> ostream& operator<<(ostream& out, map<L, R> vec) { out<<"("; for (auto& v: vec) out<<v<<", "; return out<<")"; }
const int N = 505;
int taken[N][N];
int32_t main() {
ios_base::sync_with_stdio(0);
cout << fixed << setprecision(10);
cerr << fixed << setprecision(10);
cin.tie(0);
//double beg_clock = 1.0 * clock() / CLOCKS_PER_SEC;
srand(clock());
int n, m;
cin>>n>>m;
vector<vector<char>> board(n + 2, vector<char>(m + 2));
RE (i, n) {
RE (j, m) {
cin>>board[i][j];
}
}
vector<VPII> dangos;
RE (i, n) {
RE (j, m) {
if (board[i][j] != 'W') { continue; }
FOR (ni, i - 1, i + 1) {
FOR (nj, j - 1, j + 1) {
if (ni == i && nj == j) { continue; }
if (board[ni][nj] == 'P' && board[2 * i - ni][2 * j - nj] == 'G') {
dangos.PB({{ni, nj}, {i, j}, {2 * i - ni, 2 * j - nj}});
if (dangos.back()[0] > dangos.back()[2]) {
swap(dangos.back()[0], dangos.back()[2]);
}
}
}
}
}
}
int best_res = 0;
vector<vector<char>> best_board;
REP (triess, 1) {
RE (i, n) {
RE (j, m) {
taken[i][j] = -1;
}
}
random_shuffle(ALL(dangos));
int res = 0;
//VI used(SZ(dangos));
auto Put = [&](int k) {
auto& dango = dangos[k];
REP (i, 3) {
assert(taken[dango[i].st][dango[i].nd] == -1);
taken[dango[i].st][dango[i].nd] = k;
}
res++;
};
auto Remove = [&](int k) {
auto& dango = dangos[k];
REP (i, 3) {
assert(taken[dango[i].st][dango[i].nd] == k);
taken[dango[i].st][dango[i].nd] = -1;
}
res--;
};
REP (ii, SZ(dangos)) {
auto dango = dangos[ii];
int can = 1;
for (auto p : dango) {
if (taken[p.st][p.nd] != -1) {
can = 0;
}
}
if (can) {
res++;
for (auto p : dango) {
taken[p.st][p.nd] = ii;
}
}
}
int last_improv = 0;
int tries = 0;
while (1) {
int i = rand() % SZ(dangos);
auto& dango = dangos[i];
if (taken[dango[0].st][dango[0].nd] == i) { continue; }
tries++;
int blocking = 0;
int last_blocking = -1;
for (auto p : dango) {
if (taken[p.st][p.nd] != -1) {
blocking++;
last_blocking = taken[p.st][p.nd];
}
}
if (blocking == 0) {
if (tries - last_improv > (int)1e6) {
debug(last_improv - tries, res);
}
last_improv = tries;
}
if (blocking <= 1) {
if (last_blocking != -1) {
Remove(last_blocking);
}
Put(i);
}
if (last_improv + 10000000 < tries) { // this constant value can be adjusted
break;
}
}
vector<vector<char>> cand = board;
REP (i, SZ(dangos)) {
auto dango = dangos[i];
auto p = dango[1];
if (taken[p.st][p.nd] == i) {
if (dango[0] == PII{p.st - 1, p.nd - 1}) {
cand[p.st][p.nd] = '\\';
} else if (dango[0] == PII{p.st - 1, p.nd}) {
cand[p.st][p.nd] = '|';
} else if (dango[0] == PII{p.st - 1, p.nd + 1}) {
cand[p.st][p.nd] = '/';
} else {
cand[p.st][p.nd] = '-';
}
}
}
if (res > best_res) {
best_board = cand;
}
maxi(best_res, res);
}
debug(best_res);
RE (i, n) {
RE (j, m) {
cout<<best_board[i][j];
}
cout<<endl;
}
//cout<<best_res<<endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgTVAgbWFrZV9wYWlyCiNkZWZpbmUgUEIgcHVzaF9iYWNrCiNkZWZpbmUgaW50IGxvbmcgbG9uZwojZGVmaW5lIHN0IGZpcnN0CiNkZWZpbmUgbmQgc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BqIC0gMSwgaiArIDEpIHsKICAgICAgICAgIGlmIChuaSA9PSBpICYmIG5qID09IGopIHsgY29udGludWU7IH0KICAgICAgICAgIGlmIChib2FyZFtuaV1bbmpdID09ICdQJyAmJiBib2FyZFsyICogaSAtIG5pXVsyICogaiAtIG5qXSA9PSAnRycpIHsKICAgICAgICAgICAgZGFuZ29zLlBCKHt7bmksIG5qfSwge2ksIGp9LCB7MiAqIGkgLSBuaSwgMiAqIGogLSBuan19KTsKICAgICAgICAgICAgaWYgKGRhbmdvcy5iYWNrKClbMF0gPiBkYW5nb3MuYmFjaygpWzJdKSB7CiAgICAgICAgICAgICAgc3dhcChkYW5nb3MuYmFjaygpWzBdLCBkYW5nb3MuYmFjaygpWzJdKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICBpbnQgYmVzdF9yZXMgPSAwOwogIHZlY3Rvcjx2ZWN0b3I8Y2hhcj4+IGJlc3RfYm9hcmQ7CiAgUkVQICh0cmllc3MsIDEpIHsKICAgIFJFIChpLCBuKSB7CiAgICAgIFJFIChqLCBtKSB7CiAgICAgICAgdGFrZW5baV1bal0gPSAtMTsKICAgICAgfQogICAgfQogICAgcmFuZG9tX3NodWZmbGUoQUxMKGRhbmdvcykpOwogICAgaW50IHJlcyA9IDA7CiAgICAvL1ZJIHVzZWQoU1ooZGFuZ29zKSk7CiAgICBhdXRvIFB1dCA9IFsmXShpbnQgaykgewogICAgICBhdXRvJiBkYW5nbyA9IGRhbmdvc1trXTsKICAgICAgUkVQIChpLCAzKSB7CiAgICAgICAgYXNzZXJ0KHRha2VuW2RhbmdvW2ldLnN0XVtkYW5nb1tpXS5uZF0gPT0gLTEpOwogICAgICAgIHRha2VuW2RhbmdvW2ldLnN0XVtkYW5nb1tpXS5uZF0gPSBrOwogICAgICB9CiAgICAgIHJlcysrOwogICAgfTsKICAgIGF1dG8gUmVtb3ZlID0gWyZdKGludCBrKSB7CiAgICAgIGF1dG8mIGRhbmdvID0gZGFuZ29zW2tdOwogICAgICBSRVAgKGksIDMpIHsKICAgICAgICBhc3NlcnQodGFrZW5bZGFuZ29baV0uc3RdW2RhbmdvW2ldLm5kXSA9PSBrKTsKICAgICAgICB0YWtlbltkYW5nb1tpXS5zdF1bZGFuZ29baV0ubmRdID0gLTE7CiAgICAgIH0KICAgICAgcmVzLS07CiAgICB9OwogICAgUkVQIChpaSwgU1ooZGFuZ29zKSkgewogICAgICBhdXRvIGRhbmdvID0gZGFuZ29zW2lpXTsKICAgICAgaW50IGNhbiA9IDE7CiAgICAgIGZvciAoYXV0byBwIDogZGFuZ28pIHsKICAgICAgICBpZiAodGFrZW5bcC5zdF1bcC5uZF0gIT0gLTEpIHsKICAgICAgICAgIGNhbiA9IDA7CiAgICAgICAgfQogICAgICB9CiAgICAgIGlmIChjYW4pIHsKICAgICAgICByZXMrKzsKICAgICAgICBmb3IgKGF1dG8gcCA6IGRhbmdvKSB7CiAgICAgICAgICB0YWtlbltwLnN0XVtwLm5kXSA9IGlpOwogICAgICAgIH0KICAgICAgfQogICAgfQogICAgaW50IGxhc3RfaW1wcm92ID0gMDsKICAgIGludCB0cmllcyA9IDA7CiAgICB3aGlsZSAoMSkgewogICAgICBpbnQgaSA9IHJhbmQoKSAlIFNaKGRhbmdvcyk7CiAgICAgIGF1dG8mIGRhbmdvID0gZGFuZ29zW2ldOwogICAgICBpZiAodGFrZW5bZGFuZ29bMF0uc3RdW2RhbmdvWzBdLm5kXSA9PSBpKSB7IGNvbnRpbnVlOyB9CiAgICAgIHRyaWVzKys7CiAgICAgIGludCBibG9ja2luZyA9IDA7CiAgICAgIGludCBsYXN0X2Jsb2NraW5nID0gLTE7CiAgICAgIGZvciAoYXV0byBwIDogZGFuZ28pIHsKICAgICAgICBpZiAodGFrZW5bcC5zdF1bcC5uZF0gIT0gLTEpIHsKICAgICAgICAgIGJsb2NraW5nKys7CiAgICAgICAgICBsYXN0X2Jsb2NraW5nID0gdGFrZW5bcC5zdF1bcC5uZF07CiAgICAgICAgfQogICAgICB9CiAgICAgIGlmIChibG9ja2luZyA9PSAwKSB7CiAgICAgICAgaWYgKHRyaWVzIC0gbGFzdF9pbXByb3YgPiAoaW50KTFlNikgewogICAgICAgICAgZGVidWcobGFzdF9pbXByb3YgLSB0cmllcywgcmVzKTsKICAgICAgICB9CiAgICAgICAgbGFzdF9pbXByb3YgPSB0cmllczsKICAgICAgfQogICAgICBpZiAoYmxvY2tpbmcgPD0gMSkgewogICAgICAgIGlmIChsYXN0X2Jsb2NraW5nICE9IC0xKSB7CiAgICAgICAgICBSZW1vdmUobGFzdF9ibG9ja2luZyk7CiAgICAgICAgfQogICAgICAgIFB1dChpKTsKICAgICAgfQogICAgICBpZiAobGFzdF9pbXByb3YgKyAxMDAwMDAwMCA8IHRyaWVzKSB7IC8vIHRoaXMgY29uc3RhbnQgdmFsdWUgY2FuIGJlIGFkanVzdGVkCiAgICAgICAgYnJlYWs7CiAgICAgIH0KICAgIH0KICAgIAogICAgdmVjdG9yPHZlY3RvcjxjaGFyPj4gY2FuZCA9IGJvYXJkOwogICAgUkVQIChpLCBTWihkYW5nb3MpKSB7CiAgICAgIGF1dG8gZGFuZ28gPSBkYW5nb3NbaV07CiAgICAgIGF1dG8gcCA9IGRhbmdvWzFdOwogICAgICBpZiAodGFrZW5bcC5zdF1bcC5uZF0gPT0gaSkgewogICAgICAgIGlmIChkYW5nb1swXSA9PSBQSUl7cC5zdCAtIDEsIHAubmQgLSAxfSkgewogICAgICAgICAgY2FuZFtwLnN0XVtwLm5kXSA9ICdcXCc7CiAgICAgICAgfSBlbHNlIGlmIChkYW5nb1swXSA9PSBQSUl7cC5zdCAtIDEsIHAubmR9KSB7CiAgICAgICAgICBjYW5kW3Auc3RdW3AubmRdID0gJ3wnOwogICAgICAgIH0gZWxzZSBpZiAoZGFuZ29bMF0gPT0gUElJe3Auc3QgLSAxLCBwLm5kICsgMX0pIHsKICAgICAgICAgIGNhbmRbcC5zdF1bcC5uZF0gPSA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