SP5157 TRACTOR - Game Simulator
Description
Please click [here](http://www.spoj.com/content/john_jones:shanghai2009.pdf) to download a PDF version of the contest problems. The problem is problem G in the PDF.
Since this problem is added as an classical problem in SPOJ, the users who get this problem Accepted (by himself/herself, I'll look at your code) before 2011.10.25 8:00:00 SPOJ time (two years right after the on-site contest's end) will be e-mailed some pictures of the problem setters of this contest - [g201513](http://www.spoj.com/users/g201513), [lcosvse](http://www.spoj.com/users/lcosvse) and [Blue Mary](http://www.spoj.com/users/xilinx). \[the offer is invalid, it has been presented to Wassim Khalil (Australia).\]
**Log**:
(1)Thanks to Thomas Schnattinger, who points out a small bug in the sample input. The corrected sample should be:
```
Input:
1
O Charles 2 2
S6S6S7S7 SASKSJST STS8S4S4 S3S5SJSQ
S9S9 H3D3 C3DT SAD3
DA DQ DK D4
SKS8S5S3 RJC2D2H2 C6C8CJD9 H3CKDTD5
H7H7 H6H4 HJHQ H9H9
DJDJ DKH5 D5D4 D6D6
D8D8 C4C3 HTH5 D9D7
C5C5 C6CT H8HQ C7C4
H8 C7 HA HA
H2 RJ BJ CK
DA BJ C8 HK
S2S2C2 CQCAD2 HTHJHK C9CQCA
Output:
Case #1:
50
3 2 Alice
```
(2) The bug about '\\r\\n' has been fixed.
Input Format
N/A
Output Format
N/A