Nim golf


Statement
You are given string S contains only 'o' and '|'.
S represents an initial state of Nim.
For example, "oo|ooo|o" represents that there are 3 piles each has 2,3,1 stones respectively.
Output "1st" if the first player wins in Nim, "2nd" otherwise.

Constraints
* 3 ≤ |S| ≤ 50
* 2 ≤ # of piles ≤ 10
* No empty piles
Sample Input
Sample Output
Writer
admin
Publish date
2021/05/11 22:45:00
Solved
54
Best
7
Top player
Yupiteru