["gpgpgppppg","ggggggggggggggg","ccpcpppcccpppcppcpcc","ggcgcgcggggcpgcggcgcggggcgcgcc"]
winCount s
| count 0 [g, c, p] /= 1 = 0
| p == 0 = g
| g == 0 = c
| c == 0 = p
where [g
, c
, p
] = zipWith count
"gcp" [s
, s
, s
]
bWFpbiA9IG1hcE0KCShwcmludCAuIHdpbkNvdW50KQoJWyJncGdwZ3BwcHBnIiwiZ2dnZ2dnZ2dnZ2dnZ2dnIiwiY2NwY3BwcGNjY3BwcGNwcGNwY2MiLCJnZ2NnY2djZ2dnZ2NwZ2NnZ2NnY2dnZ2djZ2NnY2MiXQoKY291bnQgZSA9IGxlbmd0aCAuIGZpbHRlciAoZSA9PSkKd2luQ291bnQgcwoJfCBjb3VudCAwIFtnLCBjLCBwXSAvPSAxID0gMAoJfCBwID09IDAgPSBnCgl8IGcgPT0gMCA9IGMKCXwgYyA9PSAwID0gcAoJd2hlcmUgW2csIGMsIHBdID0gemlwV2l0aCBjb3VudCAiZ2NwIiBbcywgcywgc10K