eolymp
bolt
Try our new interface for solving problems

Heaps

Statement for this problem is only available as a file.
Time limit 1.2 second
Memory limit 256 MiB
Input example #1
3 2
2
1 5
3 2
3
0 3
2 1
3 2
Output example #1
Win
Loss