morse code

can some body tell me how to solve this problem …

it is based on morse code …and a good problem for learners…

I have thought over it as using two map one like map<string,char > and map since both type of conversion are required …but i am not getting how to calculate the no of such string and how to print them in dictionary order…???
I am new in making codes ,it seem its a kind of dynamic problem …kindly suggest me the algorithm to solve it …

//