class Ideone {
public static void main
( String [ ] args
) { for ( int num = 0 ; num <= 26 ; num++ ) {
System .
out .
printf ( "%2s %2s %2s%n" ,
toAlphabeticRadix( num)
) ;
}
}
public static String toAlphabeticRadix
( int num
) { char [ ] str
= Integer .
toString ( num,
26 ) .
toCharArray ( ) ; for ( int i = 0 ; i < str.length ; i++ ) {
str[ i] += str[ i] > '9' ? 10 : 49 ;
}
}
}
Y2xhc3MgSWRlb25lIHsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB7CgkJZm9yIChpbnQgbnVtID0gMDsgbnVtIDw9IDI2OyBudW0rKykgewoJCSAgICBTeXN0ZW0ub3V0LnByaW50ZigiJTJzICUycyAlMnMlbiIsCgkJICAgICAgICBJbnRlZ2VyLnRvU3RyaW5nKG51bSwgMTApLAoJCSAgICAgICAgSW50ZWdlci50b1N0cmluZyhudW0sIDI2KSwKCQkgICAgICAgIHRvQWxwaGFiZXRpY1JhZGl4KG51bSkKCQkgICAgKTsKCQl9Cgl9CgkKCXB1YmxpYyBzdGF0aWMgU3RyaW5nIHRvQWxwaGFiZXRpY1JhZGl4KGludCBudW0pIHsKICAgICAgICBjaGFyW10gc3RyID0gSW50ZWdlci50b1N0cmluZyhudW0sIDI2KS50b0NoYXJBcnJheSgpOwogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgc3RyLmxlbmd0aDsgaSsrKSB7CgkJCXN0cltpXSArPSBzdHJbaV0gPiAnOScgPyAxMCA6IDQ5OwogICAgICAgIH0KICAgICAgICByZXR1cm4gbmV3IFN0cmluZyhzdHIpOwogICAgfQp9