Directions for the next 2 questions: There are three bottles of water, A, B, C, whose capacities are 5 litres, 3 litres, and 2 litres respectively. For transferring water from one bottle to another and to drain out the bottles, there exists a piping system. The flow through these pipes is computer controlled. The computer that controls the flow through these pipes can be fed with three types of instructions, as explained below:
| Instruction type | Explanation for the instruction |
|---|---|
| FILL (X, Y) | Fill bottle labeled X from the water in bottle labeled Y, where the remaining capacity of X is less than or equal to the amount of water in Y. |
| EMPTY (X, Y) | Empty out water in bottle labeled X into bottle labeled Y, where the amount of water in X is less than or equal to remaining capacity of Y. |
| DRAIN (X) | Drain out all the water contained in bottle labeled X. |
Initially, A is full with water, and B and C are empty.