Print the Possible Decoding of a given Digit Sequence

A secret message containing letters from A-Z is being encoded to numbers using the following mapping:

‘A’ -> 1
‘B’ -> 2

‘Z’ -> 26


How can we print all the possible decoding of the given digit sequence.
Can anyone help me out with working code