A simple program that solves the three jug problem