Decode String 394 Leetcode Python