def add_operators(num, target):
def dfs(res, path, num, target, pos, prev, multed):<EOL><INDENT>if pos == len(num):<EOL><INDENT>if target == prev:<EOL><INDENT>res.append(path)<EOL><DEDENT>return<EOL><DEDENT>for i in range(pos, len(num)):<EOL><INDENT>if i != pos and num[pos] == '<STR_LIT:0>':  <EOL><INDENT>break<EOL><DEDENT>cur = int(num[pos:i+<NUM_LIT:1>])<EOL>if pos == <NUM_LIT:0>:<EOL><INDENT>dfs(res, path + str(cur), num, target, i+<NUM_LIT:1>, cur, cur)<EOL><DEDENT>else:<EOL><INDENT>dfs(res, path + "<STR_LIT:+>" + str(cur), num, target,<EOL>i+<NUM_LIT:1>, prev + cur, cur)<EOL>dfs(res, path + "<STR_LIT:->" + str(cur), num, target,<EOL>i+<NUM_LIT:1>, prev - cur, -cur)<EOL>dfs(res, path + "<STR_LIT:*>" + str(cur), num, target,<EOL>i+<NUM_LIT:1>, prev - multed + multed * cur, multed * cur)<EOL><DEDENT><DEDENT><DEDENT>res = []<EOL>if not num:<EOL><INDENT>return res<EOL><DEDENT>dfs(res, "<STR_LIT>", num, target, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>)<EOL>return res<EOL>
:type num: str
:type target: int
:rtype: List[str]