Solution to hidden digits challenge.