# 0 만들기 import sys from collections import deque input = sys.stdin.readline OPERATOR = [" ", "+", "-"] # 아스키 순서 def dfs(depth, n, exp): if depth == n: exp += str(depth) if eval(exp.replace(" ", "")) == 0: print(exp) return for op in OPERATOR: dfs(depth+1, n, exp+str(depth)+op) def solution(): t = int(input().rstrip()) for _ in range(t): n = int(input().rstrip()) dfs(1, n, "") print() return solution() """ 걸린 시간: 11:18~ 시간 복잡도: 해설: """