A positive (strictly greater than zero) integer is called round if it is of the form d00...0. In other words, a positive integer is round if all its digits except the leftmost (most significant) are equal to zero. In particular, all numbers from $1$ to $9$ (inclusive) are round.

For example, the following numbers are round: $4000$, $1$, $9$, $800$, $90$. The following numbers are not round: $110$, $707$, $222$, $1001$.

You are given a positive integer $n$ ($1 \le n \le 10^4$). Represent the number $n$ as a sum of round numbers using the minimum number of summands (addends). In other words, you need to represent the given number $n$ as a sum of the least number of terms, each of which is a round number.


-----Input-----

The first line contains an integer $t$ ($1 \le t \le 10^4$) — the number of test cases in the input. Then $t$ test cases follow.

Each test case is a line containing an integer $n$ ($1 \le n \le 10^4$).


-----Output-----

Print $t$ answers to the test cases. Each answer must begin with an integer $k$ — the minimum number of summands. Next, $k$ terms must follow, each of which is a round number, and their sum is $n$. The terms can be printed in any order. If there are several answers, print any of them.


-----Example-----
Input
5
5009
7
9876
10000
10

Output
2
5000 9
1
7 
4
800 70 6 9000 
1
10000 
1
10

Difficulty: introductory

Starter code:

Solutions:
for _ in range(int(input())):
    n = int(input())
    # arr = list(map(int, input().split()))
    # n, m = map(int, input().split())
    arr = []
    x = 1
    while n > 0:
        if (n % 10):
            arr.append((n % 10) * x)
        n //= 10
        x *= 10
    print(len(arr))
    print(*arr)

t = int(input())
for _ in range(t):
	s = input()
	n = len(s)
	ans = []
	for i in range(n):
		if s[i] != "0":
			ans.append(s[i] + "0" * (n-1-i))
	print(len(ans))
	print(*ans)

for _ in range(int(input())):
    s = input()

    print(len(s.replace('0', '')))

    for i, j in enumerate(s[::-1]):
        if j != '0':
            print(j + '0' * i, end=' ')

    print()

for t in range(int(input())):
    st = input()
    k = len(st) - 1
    ans = []
    for i in st:
        if i != '0':
            ans.append(i + '0' * k)
        k -= 1
    print(len(ans))
    print(*ans)

for _ in range(int(input())):
    n = list(map(int, input()))
    ans = []
    for i in range(len(n)):
        x = str(n[i]) + '0' * (len(n) - i - 1)
        x = int(x)
        if x != 0:
            ans.append(x)
    print(len(ans))
    print(*ans)

from math import *

for zz in range(int(input())):
    n = int(input())
    cp = 10
    ans = []
    while n > 0:
        t = (n % cp) - n % (cp//10)
        if t > 0:
            ans.append(t)
        n -= t
        cp *= 10
        #print(n, t, cp)

    print(len(ans))
    print(*ans)


'''input
5
5009
7
9876
10000
10
'''
def solve():
	s = input()
	ln = len(s)
	ans = []
	for i in s:
		num = int(i+(ln-1)*'0')
		if num!=0:
			ans.append(num)
		ln-=1
	print(len(ans))
	for i in ans:
		print(i,end=" ")
	print()
	return 
t = 1
t = int(input())
while t>0:
	t-=1
	solve()



for _ in range(int(input())):
	s=input()
	print(len(s)-s.count('0'))

	n=int(s)
	pw=1
	while(n):
		if(n%10):
			print(pw*(n%10),end=" ")
		n//=10
		pw*=10
	print()

for _ in range(int(input())):
    s=input()
    n=len(s)-1
    k=0
    a=[]
    for x in s:
        if x!="0":
            k+=1
            a.append(x+"0"*n)
        n-=1
    print(k)
    print(*a)


for _ in range(int(input())):
	n = int(input())
	l = []
	i = 0
	while n:
		if n % 10:
			l.append((n % 10) * 10 ** i)
		i += 1
		n //= 10
	print(len(l))
	print(*l)


import math,sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda:int(input())
li = lambda:list(map(int,input().split()))

def case():
    n=input().strip()
    ans=[]
    for i in range(len(n)):
        if(n[i]!="0"):
            ans.append(n[i]+"0"*(len(n)-i-1))
    print(len(ans))
    print(*ans)

for _ in range(int(input())):
    case()

for _ in range(int(input())):
    n = int(input())
    l = []
    for i in str(n):
        l.append(i)
    ans = []
    l = l[-1::-1]
    cnt = 0
    for i in l:
        if i!='0':
            ans.append(int(i)*pow(10,cnt))
            cnt+=1
        else:
            cnt+=1
    print(len(ans))
    print(*ans)
    # print(l) 


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nlargest, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(pow(10, 6))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("output.txt", "w")
mod = pow(10, 9) + 7
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(" ".join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return list(map(int, data().split()))
def ssp(): return list(map(str, data().split()))
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


for _ in range(int(data())):
    n = data()
    answer = []
    i = 0
    while i < len(n):
        if n[i] != '0':
            answer.append(int(n[i]) * pow(10, len(n)-i-1))
        i += 1
    out(len(answer))
    out(*answer)


for nt in range(int(input())):
	n=int(input())
	if n>=1 and n<=9:
		print (1)
		print (n)
		continue
	s=str(n)
	count=0
	ans=[]
	for i in range(len(s)):
		if s[i]!="0":
			count+=1
			ans.append(s[i]+"0"*(len(s)-i-1))
	print (count)
	print (*ans)

for t in range(int(input())):
    n = input()
    ans = [n[i] + "0" * (len(n) - i - 1) for i in range(len(n)) if n[i] != "0"]
    print(len(ans))
    print(" ".join(ans))


t = int(input())
for i in range(t):
    n = input()
    print(len(n) - n.count('0'))
    for j in range(len(n)):
        if n[j] != '0':
            print(n[j], '0' * (len(n) - j - 1),end=' ', sep='')
    print()

t = int(input())
for y in range(t):
	n = input()
	ans = []
	m = len(n)
	for i in range(m):
		if n[i] != '0':
			ans.append(int(n[i])*pow(10,m-i-1))
	print(len(ans))
	print(*ans)



from sys import stdin, stdout  
#input = stdin.readline
#print = stdout.write

for _ in range(int(input())):
    x = input()
    res = []
    for ind, i in enumerate(x):
        if i != '0':
            res.append(i + '0' * (len(x) - ind - 1))
    print(len(res))
    print(*res)


t = int(input())
for tests in range(t):
    n = input()
    x = len(n)
    print(x - n.count('0'))
    for i in range(x):
        if n[i] != '0':
            print(n[i] + '0'* (x - i - 1), end =' ')
    print()


def sol():
    x=int(input())
    res=[]
    pw=0
    while x>0:
        p=x%10
        if p>0:
            d=p*(10**pw)
            res.append(d)
        pw+=1
        x//=10

    print(len(res))
    print(*res)

for n in range(int(input())):
    sol()


def read_int():
    return int(input())


def read_ints():
    return list(map(int, input().split(' ')))


t = read_int()
for case_num in range(t):
    n = read_int()
    ans = []
    s = str(n)
    l = len(s)
    for i in range(l):
        if s[-i-1] != '0':
            ans.append(int(s[-i-1]) * (10 ** i))
    print(len(ans))
    print(' '.join(map(str, ans)))


import math as mt 
import sys,string
input=sys.stdin.readline
import random
from collections import deque,defaultdict
L=lambda : list(map(int,input().split()))
Ls=lambda : list(input().split())
M=lambda : list(map(int,input().split()))
I=lambda :int(input())
t=I()
for i in range(t):
    n=input().strip()
    k=len(n)-1
    l=[]
    for i in range(len(n)):
        if(n[i]!='0'):
            l.append(int(n[i])*pow(10,k))
        k-=1
    print(len(l))
    print(*l)


import sys
readline = sys.stdin.readline

t = int(input())
for _ in range(t):
    n = readline().rstrip()
    ans = []
    for i, c in zip(list(range(100)), reversed(n)):
        if c != '0':
            ans.append(c + '0'*i)
    print(len(ans))
    print(*ans)


t = int(input())
for i in range(t):
    n = input()
    k = []
    for i in range(len(n)):
        if n[i] != "0":
            k.append(int(n[i])*10**(len(n)-i-1))
    print(len(k))
    print(*k)