P01 solution.
P02 solution.