Time Limit: 6000 MS Memory Limit: 65536 K
BiG LeE has 3 milk cups of capacity A, B, and C oz (0<=A, B, C<=20). Initially, cup A and cup B are empty while cup C is full of milk. BiG LeE must drink milk every day to get healthier. Of course he does like drinking milk. BiG LeE wants to enjoy drinking so he does not want to drink the milk off. He thinks out a good idea that he can pours milk from one cup to another until the second cup is filled or the first cup is empty. Once begun, a pour must be completed. BiG LeE is experienced so that it can be sure that no milk may be tossed out.After then, milk will be separated and BiG LeE can enjoy at least two cups of milk!
BiG LeE wants to know when cup A is empty, what amounts of milk he can leave in cup C when he begins with three cups as above.
Each case contains a single line with the three integers A, B, and C.
Each case contains a single line with a sorted list of all the possible amounts of milk that can be in cup C when cup A is empty.
8 9 10
9 9 5
1 2 8 9 10