1 2 2 3 10 20 1 3 2 3 22 33 3 2 2 3 4 5 5 3 2 3 2 3 0 0 0 0 0 0
Case 1: 1A 2M Case 2: 1M 2A 1M Case 3: impossible Case 4: empty