t(){ tr 0-8a-i $b$b
}
p(){ t<<E
0-1-2
|\|/|
3-4-5
|/|\|
6-7-8
E
}
g(){ b=`tr $x$e $e$x<<<012345678|t`
p
e=$x
}
b=bbbbowwww
e=4
m=0
p
while [ $m != 5 ]&&read x;do
g
m=0
for y in {0..8};do
s=0
S=05011234
grep -E "w.*($y$e|$e$y)"<<<${b:$y:1}30125876340142548746>/dev/null&&for p in wow.\*/ww wow.\*/w bbo.\*/b obb.\*/b www wbw .
do
((s++))
tr $y$e $e$y<<<3012587630/4e|t|grep $p>/dev/null&&break
done
s=${S:$s:1}
[ $s -gt $m ]&&m=$s x=$y
done
g
done
dCgpeyB0ciAwLThhLWkgJGIkYgp9CnAoKXsgdDw8RQowLTEtMgp8XHwvfAozLTQtNQp8L3xcfAo2LTctOAoKRQp9CmcoKXsgYj1gdHIgJHgkZSAkZSR4PDw8MDEyMzQ1Njc4fHRgCnAKZT0keAp9CmI9YmJiYm93d3d3CmU9NAptPTAKcAp3aGlsZSBbICRtICE9IDUgXSYmcmVhZCB4O2RvCmcKbT0wCmZvciB5IGluIHswLi44fTtkbwpzPTAKUz0wNTAxMTIzNApncmVwIC1FICJ3LiooJHkkZXwkZSR5KSI8PDwke2I6JHk6MX0zMDEyNTg3NjM0MDE0MjU0ODc0Nj4vZGV2L251bGwmJmZvciBwIGluIHdvdy5cKi93dyB3b3cuXCovdyBiYm8uXCovYiBvYmIuXCovYiB3d3cgd2J3IC4KZG8KKChzKyspKQp0ciAkeSRlICRlJHk8PDwzMDEyNTg3NjMwLzRlfHR8Z3JlcCAkcD4vZGV2L251bGwmJmJyZWFrCmRvbmUKcz0ke1M6JHM6MX0KWyAkcyAtZ3QgJG0gXSYmbT0kcyB4PSR5CmRvbmUKZwpkb25l