1;BEGIN{eval$t=%q(eval(%w(d="(a,b=b,a;#{c="(r=l=''
;6    4.    ti    me    s{    |n    |p    =2    <<
n+    n/    8;    v=    '.    .8    6.    41    7.
5.9...32'[((n%8*2-7).*n/8*2-7).abs%19,1];#{o="m=0;
(a    |b    )&    p>    0|    |9    .t    im    es
{|    s|    e,    q=    0,    p;    (e    |=    q)
while(q<<=s*9%26-10)&b>0;a&q>0&&m|=e};"}l>v||m>0&&
(l    <v    &&    (l    ,r    =v    ,[    ])    ;r
<<    p)    };    p=    r[    00    00    00    00
0000])&&("}#{w=o+"b^=m;a^=m|p)"};a,b=b,a;p)";z=32.
ch    r;    c+    =" () |' \/ 'u    nt    il    ($
><    <'    ?'    +( () |' /\ ';    z)    ;g    et
s)=~/^[A-H][1-8]$/&&(p=1<<$&.tr('A-H','0-7').to_i(
9)    ;#    {o    }' \/ '; () ;m    >0    );    "+
w;    b,    a=    (' /\ '; () ;2    57    )<    <3
2,1025<<31;puts"<<Reversi>>";loop{i=f=g=0;puts(*("
A"    ..    "H    ")    .m    ap    {|    x|    9.
ti    me    s{    x+    ="    :"    <<    32    +a
[i+=1]*47+b[i]*56};x}<<[z,*1..8]*z);eval(c+"&&(c,d
=d    ,c    )|    |"    +d    )|    |(    72    .t
im    es    {f    +=    a&    1;    a/    =2    ;g
+=b&1;b/=2};puts"O:#{f},X:#{g}",f<g&&"youmdon'tmde
se    rv    em    qu    in    e"    .t    r(    "m
",    z)    ||    "R    ev    er    si    \n    1;
BEGIN{eval$t=%q(#$t)}";exit)}#(c)Y.Endoh'10)*''))}
