Are you going to post a solution to the hard part of the problem, or leave that to the ITA candidates? :-)
Reminds me of Parikh’s theorem which shows that the commutative image of a context free language is a regular set. – sigfpe
I found the answer to the hard / sorted problem to be the last character of “sixhundredseventysixmillionsevenhundredfortysixthousandfivehundredseventyfive” but I don’t have an independent check. – chris k (haskell at list dot mightyreason dot com)