For a natural number n, consider the 10n numbers written with n digits, from 00...0 (n zeros) to 99...9 (n nines). Call such a number an unchanging number if the last n digits of its square are the same as the number itself.
Whatever the digit count n is, there are always exactly four unchanging numbers. Two of them are 00...0 and 00...01, and of the other two, one has 5 as its last digit and the other has 6. For n=4 the unchanging numbers are 0000, 0001, 0625 and 9376. Here 00002=0, 00012=1, 06252=390625 and 93762=87909376, and every square ends with the original four digits.
Given the digit count n, write a program that prints which of the two is larger, the unchanging number whose last digit is 5 or the unchanging number whose last digit is 6.