apple pie's submission of Three Boxes | CodeChef