Working version of Type-A-Number Challenge