Types: datasets: List[Tuple[List[int]]]
Ranges: 0 ≤ pi ≤ 11, no more than 100 datasets, each dataset consists of lines with integers p1, (p2 p3 p4), (p5 p6 p7 p8 p9), (p10 p11 p12), p13
Addtl Info: Datasets end with a single line -1, 0 represents an empty space, output "NA" if more than 20 steps.