Find All Possible combinations

I came across a very interesting question.
Alice wants to send a message to bob but doesn’t want Eve to read it so she encrpyts the message using the following scheme
A = ._
B= _…
C = ..
D =
E = .
F = …
G = __.

So on
so given an encrpyted input string like _… we have to display all possible combinations this string has in alphabetical order like for this string we can have DB and E as different combinations.How to solve this please help.Just to clarify this is not a question of any contest currently going on.



Actually this was asked in a company interview so i dont have the link