A student erases a few of them, and instead writes the digit(s) of their product. (For example if he erases 4, 3 and 7 he would write the digits 8 and 4 since 4 * 3 * 7 = 84.) He also writes a few other random digits on the board.
He repeats this process until only one digit remains on the board. What is this digit and why?