Types: n: int, m: int, s: int, g1: int, g2: int, b1: int, b2: int, c: int  
Ranges: 3 ≤ n ≤ 100, 2 ≤ m ≤ 1000, 1 ≤ s, g1, g2 ≤ n, 1 ≤ c ≤ 1000  
Addtl Info: s, g1, and g2 are distinct; b1 and b2 are distinct; input ends with a line containing five zeros separated by spaces