I wasted 1 hr in decoding how the "whileloop" relates to 12345π
Then I got to know that it was just an example, here we are supposed to encode it in our own way, and using its reverse, decode it in another function!
So the output of the first function is the input of the second!