Filling the Gaps

Well done to Christopher from Sale Grammar School who sent us this solution using modular arithmetic.