<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> class Solution : <EOL> digit2letters = { <EOL> '<STR_LIT:2>' : "<STR_LIT:abc>" , <EOL> '<STR_LIT:3>' : "<STR_LIT>" , <EOL> '<STR_LIT:4>' : "<STR_LIT>" , <EOL> '<STR_LIT:5>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : "<STR_LIT>" <EOL> } <EOL> def letterCombinations ( self , digits ) : <EOL> """<STR_LIT>""" <EOL> result = [ ] <EOL> self . dfs_traverse ( digits , "<STR_LIT>" , result ) <EOL> return result <EOL> def dfs_traverse ( self , string_seq , current , result ) : <EOL> if not string_seq : <EOL> result . append ( current ) <EOL> return <EOL> for letter in self . digit2letters [ string_seq [ <NUM_LIT:0> ] ] : <EOL> self . dfs_traverse ( string_seq [ <NUM_LIT:1> : ] , current + letter , result ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> print Solution ( ) . letterCombinations ( "<STR_LIT>" ) </s>
