This is the finished versions.

This code agrees with most of RFC 5322's standards,  and registers only
valid top level domain names.  I also realized that the bugs that
occurred in the previous code were because I spelled the alphabet
wrongly. Oh well, better luck next time for me.