Wolfram Mathematica, 75 bytes ============================= {"Hare ","Krishna ","Rama ","\n"}[[#]]&/@IntegerDigits[5581610027956,5]<>"" Every part of result was encoded as an index in a list, and every index was encoded as digit of 5-ary integer.