Example 1
Input
3 xoooo xoooo oxooo oxooo oooxo oooxo
Output
12 12 -3
Example 2
Input
3 xoooo xoooo oxooo oxooo ooooo oooox
Output
8 12 -3
Example 3
Input
5 xoooo xoooo xoooo oxooo xoooo ooxoo xoooo oooxo xoooo oooox
Output
0 20 -5
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.