public class Main
{static String k
(String s
){return s.
replaceAll("...$",
"\n");}static java.
util.
function.
Function<Integer,java.
util.
function.
Function<Integer,String
>>C
=
p
->q
->{int c
=0,l
=0,s
[]=new int[p
*q
],i
=0,j,t,b
;java.
util.
List e
=new java.
util.
Stack();String v
="TJQK",o
="",n
[]=new String[p
*q
],x
=o,z
;for(;i
<p
;x
+=v
)o
+="Player "+i
+++" | ";o
=k
(o
);for(i
=-1;++i
<q
;o
=k
(k
(o
)+x.
replace(v,
"'------' | "))){o
=k
(o
+x.
replace(v,
".------. | "));for(j
=p
;j
-->0;o
+="|2.--. | | ".
replace("2",n
[c
++])){for(;e.
contains(z
=(t
=(int)(Math.
random()*13))+""+v.
charAt(b
=(int)(Math.
random()*4))););e.
add(z
);s
[c
]=b
;n
[c
]=t
<1?"A":t
<9?++t
+"":""+v.
charAt(t
-9);}for(o
=k
(o
);++j
<p
;o
+="| "+(t
<1?"(\\/)":t
<3?":/\\:":":():")+" | | ")t
=s
[l
++];for(o
=k
(o
);j
-->0;o
+="| "+(t
<2?":\\/:":t
<3?"(__)":"()()")+" | | ")t
=s
[i
*p
+j
];for(o
=k
(o
);++j
<p
;)o
+="| '--'2| | ".
replace("2",n
[i
*p
+j
]);}return o
;}
;public static void main
(String[]a
){System.
out.
print(C.
apply(5).
apply(5));}}
cHVibGljIGNsYXNzIE1haW57c3RhdGljIFN0cmluZyBrKFN0cmluZyBzKXtyZXR1cm4gcy5yZXBsYWNlQWxsKCIuLi4kIiwiXG4iKTt9c3RhdGljIGphdmEudXRpbC5mdW5jdGlvbi5GdW5jdGlvbjxJbnRlZ2VyLGphdmEudXRpbC5mdW5jdGlvbi5GdW5jdGlvbjxJbnRlZ2VyLFN0cmluZz4+Qz0KCnAtPnEtPntpbnQgYz0wLGw9MCxzW109bmV3IGludFtwKnFdLGk9MCxqLHQsYjtqYXZhLnV0aWwuTGlzdCBlPW5ldyBqYXZhLnV0aWwuU3RhY2soKTtTdHJpbmcgdj0iVEpRSyIsbz0i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