Solution to CF262 Problem A