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

Source: codeforces | Difficulty: EASY
Tags: Mathematics

Implementation


Solutions:
def answer(n):
	if n <= 9:
		return [n]
	else:
		list1 = []
		q = n // 10
		r = n % 10
		if r != 0:
			list1.append(r)
		p = answer(q)
		for i in p:
			list1.append(i * 10)
		return list1
t = int(input())
for j in range(t):
	n = int(input())
	l = answer(n)
	k = len(l)
	print(k)
	print(*l)


T = int(input())
for _ in range(T):
	n = int(input())
	ans = []
	c = 0
	while n > 0:
		if n % 10 == 0:
			n = n // 10
		else:
			val = n % 10
			for _ in range(c):
				val = val * 10
			ans.append(val)
			n = n // 10
		c += 1
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print('')


n = int(input())
c = 0
j = 1
l = []
for i in range(n):
	a = input()
	for i in range(len(a)):
		if int(a[i]) == 0:
			c += 1
	print(len(a) - c)
	c = 0
	for i in range(len(a)):
		if int(a[i]) != 0:
			l.append(a[i] + '0' * len(a[i + 1:]))
	print(' '.join(l))
	l = []


import sys
import math

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

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

def inputstring():
	return [x for x in input()]
t = int(input())
for q in range(t):
	s = inputstring()
	count = 0
	for i in s:
		if i != '0':
			count += 1
	print(count)
	for i in range(len(s)):
		rtn = ''
		if s[i] != '0':
			rtn += s[i]
			for j in range(len(s) - i - 1):
				rtn += '0'
			print(rtn, end=' ')
	print()


def parse():
	inputs = []
	nbCase = int(input())
	for i in range(nbCase):
		line = input()
		inputs.append(list(map(int, line.split())))
	return inputs

def write_tab(tab):
	w = ''
	for i in range(len(tab)):
		w += str(tab[i]) + ' '
	return w

def solve():
	inputs = parse()
	for case in inputs:
		rounds = decomposition(case[0])
		print(len(rounds))
		print(write_tab(rounds))

def decomposition(number):
	rounds = []
	b = 1
	while number != 0:
		round_b = number % 10 * b
		if round_b != 0:
			rounds.append(round_b)
		number = number // 10
		b *= 10
	return list(rounds)
solve()


n = int(input())
l = []
k = []
for i in range(n):
	o = 0
	p = int(input())
	if str(p)[-1] == 0:
		l.append(1)
		k.append(p)
	else:
		j = str(p)[::-1]
		for q in range(len(j)):
			if j[q] != '0':
				c = ''
				c = j[q] + '0' * q
				k.append(int(c))
				o += 1
		l.append(o)
for i in range(n):
	print(l[i])
	for j in range(l[i]):
		print(k[0], end=' ')
		k.remove(k[0])
	print()


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


for _ in range(int(input())):
	n = input()
	c = n.count('0')
	t = int(n)
	p = len(n) - c
	print(p)
	for i in range(0, len(n)):
		if t % 10 != 0:
			print(t % 10 * 10 ** i, end=' ')
		t = t // 10
	print()


n = int(input())
s = [0] * n
for i in range(n):
	s[i] = int(input())
for i in range(n):
	count = 0
	test = s[i]
	while test > 0:
		if test % 10 > 0:
			count += 1
		test = test // 10
	print(count)
	ans = ''
	test = s[i]
	k = 10
	while test // k > 0:
		m = test % k
		if m > 0:
			test -= m
			ans += str(m)
			ans += ' '
		k = k * 10
	ans += str(test)
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	a = []
	while n is not 0:
		a.append(n % 10)
		n //= 10
	x = []
	for i in range(0, len(a)):
		if a[i] is not 0:
			x.append(a[i] * 10 ** i)
	print(len(x))
	print(*x)


import sys
sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline

def solve(n):
	n = list(reversed(n))
	ans = []
	for i in range(len(n)):
		if n[i] != '0':
			ans.append(int(n[i]) * 10 ** i)
	print(len(ans))
	print(*ans)
t = int(rl())
ns = [list(rl().rstrip()) for _ in range(t)]
for ni in ns:
	solve(ni)


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	number = int(stdin.readline())
	res = []
	count = 0
	while number:
		if number % 10 > 0:
			count += 1
		res.append(number % 10)
		number = number // 10
	stdout.write(str(count) + '\n')
	for i in range(len(res)):
		res[i] = res[i] * 10 ** i
		if res[i] > 0:
			stdout.write(str(res[i]) + ' ')
	stdout.write('\n')


t = int(input())
for i in range(t):
	n = input()
	result = [int(n[i]) * 10 ** (len(n) - i - 1) for i in range(len(n))]
	result = ' '.join(sorted([str(i) for i in result if i], key=len))
	print(len(result.split()))
	print(result)


testes = int(input())
respostas = []

def checar_round(numero):
	if numero.count('0') == len(numero) - 1:
		return True
	else:
		return False
for x in range(testes):
	numero = input()
	if checar_round(numero) is True:
		respostas.append(numero)
	else:
		z = 1
		num = []
		for x in numero:
			if int(x) != 0:
				num.append(x + '0' * (len(numero) - z))
			z += 1
		respostas.append(num)
for x in respostas:
	if checar_round(x) is True:
		print(1)
		print(x)
	else:
		print(len(x))
		print(' '.join(x))


t = int(input())
while t > 0:
	n = input()
	l = []
	while len(n) > 0:
		if int(n[0]) % 10 != 0:
			l.append(int(n[0]) * 10 ** (len(n[0:]) - 1))
		if len(n) > 0:
			n = n[1:]
	print(len(l))
	print(*l)
	t -= 1


t = int(input())
while t > 0:
	n = int(input())
	if n <= 10:
		print('1')
		print(n)
	else:
		c = 0
		a = []
		while n > 0:
			x = n % 10
			if x != 0:
				a.append(x * 10 ** c)
			n //= 10
			c += 1
		print(len(a))
		for i in a:
			print(i, end=' ')
		print()
	t -= 1


t = int(input())
for i in range(t):
	list1 = []
	n = input()
	l = len(n)
	k = 0
	for i in n:
		if i != '0':
			list1.append(int(i) * 10 ** (l - k - 1))
		k += 1
	print(len(list1))
	print(' '.join(map(str, list1)))


t = int(input())
for i in range(t):
	n = int(input())
	nb = 0
	ans = []
	if n <= 9 or n == 10000:
		print('1' + '\n' + str(n))
	else:
		tn = [j for j in str(n)]
		diff = len(tn)
		for j in range(diff):
			tans = int(tn[j]) * 10 ** (diff - j - 1)
			if tans != 0:
				ans.append(str(tans))
				nb += 1
		print(str(nb) + '\n' + ' '.join(ans))


def gen_all_beatiful():
	res = []
	for i in range(1, 10):
		cur = i
		for j in range(5):
			if cur > 10000:
				break
			res.append(cur)
			cur *= 10
	res.sort(reverse=True)
	return res

def main():
	all_beatiful = gen_all_beatiful()
	numbers = int(input())
	for i in range(numbers):
		num = int(input())
		res = []
		for elem in all_beatiful:
			if num == 0:
				break
			if num >= elem:
				res.append(elem)
				num -= elem
		print(len(res))
		print(*res)
main()


for i in range(int(input())):
	n = list(input())
	lst = []
	l = len(n)
	for i in range(l):
		if n[i] != '0':
			lst.append(n[i] + '0' * (l - i - 1))
	print(len(lst))
	print(*lst)


t = int(input())
for i in range(t):
	n = str(int(input()))
	l = len(n)
	count = 0
	x = l
	N = []
	for j in range(l):
		d = int(n[j])
		if d != 0:
			N.append(d * pow(10, x - 1))
			count += 1
		x -= 1
	print(count)
	print(*N)


INT_MAX = 10 ** 19 + 7
MOD = 10 ** 12 + 7

def INPUT():
	return list((int(i) for i in input().split()))

def LIST_1D_ARRAY(n):
	return [0 for _ in range(n)]

def LIST_2D_ARRAY(m, n):
	return [[0 for _ in range(n)] for _ in range(m)]
for _ in range(int(input())):
	n = int(input())
	i = 0
	A = []
	while n != 0:
		r = n % 10
		if r != 0:
			A.append(r * 10 ** i)
		i += 1
		n //= 10
	print(len(A))
	print(*A)


n = int(input())

def solve(n):
	ans = []
	n = str(n)
	for (i, d) in enumerate(n):
		if d != '0':
			ans.append(d + '0' * (len(n) - i - 1))
	return ans
for _ in range(n):
	n = int(input())
	a = solve(n)
	print(str(len(a)))
	print(' '.join(a))


t = int(input())
for _ in range(t):
	n = int(input())
	arr = []
	xx = 1
	while n != 0:
		arr.append(n % 10 * xx)
		n //= 10
		xx *= 10
	arr = arr[::-1]
	cc = 0
	vv = []
	for x in arr:
		if x != 0:
			cc += 1
			vv.append(x)
	print(cc)
	print(*vv)


t = int(input())
for i in range(t):
	s = []
	d = []
	n = [i for i in input()]
	n.reverse()
	for i in range(len(n)):
		s.append(int(n[i] + '0' * i))
	for i in s:
		if i != 0:
			d.append(i)
	print(len(d))
	print(*d)


l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]
t = int(input())
a = len(l)
for i in range(t):
	l2 = list()
	n = int(input())
	c = 0
	while n != 0:
		for j in range(a):
			if n < l[j]:
				n = n - l[j - 1]
				c = c + 1
				l2.append(l[j - 1])
				break
			elif n == l[j]:
				c = c + 1
				n = n - l[j]
				l2.append(l[j])
				break
	print(c)
	for j in range(c):
		print(l2[j], '', end='')
	print()
	del l2


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


n = int(input())
for i in range(n):
	x = int(input())
	n_z = 0
	t = 0
	res = ''
	while x != 0:
		if x % 10 != 0:
			res += str(x % 10) + '0' * n_z + ' '
			t += 1
		x //= 10
		n_z += 1
	print(t)
	print(res[:-1])


n = int(input())
(nums, ans) = ([], [])
for _ in range(n):
	nums.append(input())
for num in nums:
	values = [i for i in num]
	length = len(values)
	lst = []
	for i in range(length):
		if values[i] != '0':
			x = length - 1 - i
			lst.append(values[i] + '0' * x)
	ans.append(lst)
for num in ans:
	print(len(num))
	print(' '.join(num))


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	st = str(n)
	cnt = 0
	ans = []
	for i in range(len(st)):
		if st[i] != '0':
			ans.append(st[i] + '0' * (len(st) - i - 1))
			cnt += 1
	print(cnt)
	for j in ans:
		print(j, end=' ')


for _ in range(int(input())):
	st = input()
	lst = []
	for i in st:
		lst.append(i)
	cnt = []
	lst = lst[::-1]
	for i in range(len(lst)):
		a = int(10 ** i)
		l = int(lst[i])
		if l * a != 0:
			cnt.append(l * a)
	n = len(cnt)
	cnt = map(str, cnt[::-1])
	print(n)
	print(' '.join(cnt))


def first(n):
	res = []
	while len(n) > 1:
		if n[0] != '0':
			res.append(n[0] + '0' * (len(n) - 1))
		n = n[1:]
	if n[0] != '0':
		res.append(n)
	return res
t = int(input())
for _ in range(t):
	n = input()
	out = first(n)
	print(len(out))
	print(' '.join(out))


for i in range(int(input())):
	s = input()
	l = []
	for i in range(len(s) - 1, -1, -1):
		if s[i] != '0':
			l.append(s[i] + '0' * (len(s) - 1 - i))
	print(len(l))
	print(*l)


for _ in range(int(input())):
	n = int(input())
	ans = []
	base = 1
	while n != 0:
		r = n % 10
		if r != 0:
			ans.append(r * base)
		base *= 10
		n //= 10
	print(len(ans))
	print(*ans)


iterator = int(input())
while iterator != 0:
	RoundNumber = []
	B = int(input())
	Counter = 0
	while B != 0:
		temp = B % 10
		if temp != 0:
			RoundNumber.append(temp * 10 ** Counter)
		B = int(int(B) / 10)
		Counter = Counter + 1
	print(len(RoundNumber))
	for I in RoundNumber:
		print(I)
	iterator = iterator - 1


T = int(input())
for _ in range(T):
	n = int(input())
	now = 1
	ans = []
	while n > 0:
		if n % 10 > 0:
			ans.append(n % 10 * now)
		n //= 10
		now *= 10
	print(len(ans))
	print(*ans)


for _ in range(int(input())):
	n = input()
	k = list(n)
	length = len(k)
	ans = []
	n = int(n)
	while length > 0:
		if int(n / 10 ** (length - 1)) * 10 ** (length - 1) > 0:
			ans.append(int(n / 10 ** (length - 1)) * 10 ** (length - 1))
		n = n % 10 ** (length - 1)
		length -= 1
	print(len(ans))
	for i in range(0, len(ans)):
		print(ans[i], end=' ')
	print('')


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)))


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())
for case in range(itg()):
	s = inp()
	ans = []
	for i in range(len(s)):
		if s[i] != '0':
			ans.append(s[i] + '0' * (len(s) - i - 1))
	print(len(ans))
	print(' '.join(ans))


rounds = []
for i in range(1, 10 ** 4 + 1):
	rest = str(i)[1:]
	count = 0
	for j in range(len(rest)):
		if rest[j] == '0':
			count += 1
	if count == len(rest):
		rounds.append(i)
t = int(input())
for i in range(t):
	num = int(input())
	cnt = 0
	arr = []
	for rnd in reversed(rounds):
		if rnd <= num:
			cnt += 1
			arr.append(rnd)
			num -= rnd
		if num == 0:
			break
	print(cnt)
	s = ''
	for j in arr:
		s += str(j) + ' '
	print(s)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		summands = []
		place_value = 1
		while n > 0:
			digit = n % 10
			if digit != 0:
				summands.append(digit * place_value)
			n //= 10
			place_value *= 10
		print(len(summands))
		print(*summands)
main()


n = int(input())
for i in range(n):
	p = int(input())
	q = str(p)
	print(len(q) - q.count('0'))
	s = []
	for i in range(len(q)):
		if int(q[i]) != 0:
			s.append(int(q[i]) * 10 ** (len(q) - i - 1))
	print(*s)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = []
	factor = 1
	while n > 0:
		m = n % 10
		n = n // 10
		if m != 0:
			ans.append(m * factor)
		factor *= 10
	print(len(ans))
	print(*ans, sep=' ')


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


t = int(input())
while t:
	s = input()
	n = len(s)
	p = ''
	ctr = 0
	if s == '0':
		print(1)
		print(0)
	else:
		for i in range(n):
			if s[i] != '0':
				p = p + s[i] + '0' * (n - i - 1) + ' '
				ctr = ctr + 1
		print(ctr)
		print(p)
	t = t - 1


t = int(input())
l = []
for i in range(t):
	n = input()
	le = len(n)
	a = []
	for j in range(le):
		if n[j] != '0':
			a.append(n[j] + '0' * (le - j - 1))
	l.append(a)
for i in l:
	print(len(i))
	print(*i)


T = int(input())
for _ in range(T):
	N = int(input())
	A = 10 ** (len(str(N)) - 1)
	arr = []
	while A >= 1 and N % A != 0:
		R = N % A
		A //= 10
		if N - R != 0:
			arr.append(N - R)
		N = R
	arr.append(N)
	print(len(arr))
	print(*arr)


t = int(input())
for _ in range(t):
	n = input()
	num_digits = len(n)
	num_addends = 0
	r = []
	for d in n:
		num_digits -= 1
		if d != '0':
			num_addends += 1
			r.append(str(int(d) * 10 ** num_digits))
	print(num_addends)
	print(' '.join(r))


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


t = int(input())
for i in range(0, t):
	l1 = [int(x) for x in list(input())]
	listado = len(l1)
	(lista, lista2) = ([], [])
	for i in range(0, listado):
		if l1[i] != 0:
			lista.append(l1[i])
			lista2.append(i)
	print(len(lista))
	for i in range(0, len(lista) - 1):
		print(10 ** (len(l1) - lista2[i] - 1) * lista[i], end=' ')
	print(10 ** (len(l1) - lista2[len(lista) - 1] - 1) * lista[-1])


def main():
	n = int(input())
	arr = []
	for i in range(n):
		arr.append(int(input()))
	vals = []
	for i in arr:
		(res, ind) = ([], 0)
		x = i
		while x >= 1:
			rest = x % 10
			x = x // 10
			if rest == 0:
				ind += 1
				continue
			res.append(rest * pow(10, ind))
			ind += 1
		print(len(res))
		print(' '.join((str(x) for x in res)))
main()


t = int(input())
for tests in range(t):
	n = int(input())
	l = []
	p = 0
	while n != 0:
		s = n % 10
		l.append(s * pow(10, p))
		n = n // 10
		p += 1
	c = l.count(0)
	for i in range(c):
		l.remove(0)
	print(len(l))
	print(*l, sep=' ')


def sol():
	n = input()
	res = []
	for i in range(len(n)):
		if n[i] != '0':
			res.append(n[i] + '0' * (len(n) - i - 1))
	print(len(res))
	print(*res)
t = int(input())
while t:
	sol()
	t -= 1


n = int(input())
nums = []
for i in range(n):
	nums.append(int(input()))
for num in nums:
	power = len(str(num)) - 1
	lis = []
	while power >= 0:
		round_n = 10 ** power
		value = num // round_n * round_n
		if value > 0:
			lis.append(value)
		num -= value
		power -= 1
	print(len(lis))
	for num in lis:
		print(num, end=' ')
	print()


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


T = int(input())
for k in range(T):
	n = int(input())
	l = []
	m = str(n)
	a = m[::-1]
	ele = ''
	for i in range(len(m)):
		if int(a[i]) >= 1:
			ele = a[i]
			for j in range(i):
				ele += str(0)
			l.append(ele)
	print(len(l))
	print(*l)


test = int(input())
for tes in range(test):
	n = str(input())
	L = []
	for x in range(len(n) - 1, -1, -1):
		if n[x] == '0':
			continue
		else:
			L.append(n[x] + '0' * (len(n) - x - 1))
	print(len(L))
	print(*L)


import sys

def solve():
	return None

def main():
	q = []
	for line in sys.stdin.readlines():
		q.append(line)
	for i in range(len(q)):
		q[i] = q[i].rstrip().split(' ')[0]
	for i in range(1, len(q)):
		num = q[i]
		nums = []
		count = 0
		zeros = ''
		for j in range(len(q[i]) - 1, -1, -1):
			if q[i][j] != '0':
				zeros += '0' * count
				nums.append(str(q[i][j]) + zeros)
			count += 1
			zeros = ''
		print(len(nums))
		print(*nums)
main()


n = int(input())
nums = []
for _ in range(n):
	num = int(input())
	nums.append(num)
for num in nums:
	i = 1
	sums = []
	if num <= 10:
		print(1)
		print(num)
	else:
		while num != 0:
			sign = num % 10 ** i
			if sign != 0:
				sums.append(sign)
			num -= sign
			i += 1
		print(len(sums))
		for s in sums:
			print(s)


def read():
	n = input()
	return [input() for _ in range(int(n))]

def solve(number: str):
	n = len(number)
	if n == 1:
		return [number]
	acc = []
	while n > 1:
		d = 10 ** (n - 1)
		number = int(number)
		g = number // d
		number %= d
		acc.append(d * g)
		n = len(str(number))
		if 1 >= n and number:
			acc.append(number)
	return acc
numbers = read()
for num in numbers:
	res = solve(num)
	print(len(res))
	print(' '.join((str(n) for n in res)))


t = int(input())
for _ in range(t):
	n = int(input())
	i = 0
	l = []
	while n:
		l.append(n % 10 * pow(10, i))
		i += 1
		n = n // 10
	m = [a for a in l if a != 0]
	print(len(m))
	for a in m:
		print(a, end=' ')


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


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


def solve(a):
	if a[0] != 0:
		if all((a[i] == 0 for i in range(1, len(a)))):
			return True
for _ in range(int(input())):
	n = int(input())
	count = 0
	b = n
	a = []
	while n > 0:
		a.append(n % 10)
		n //= 10
	a.reverse()
	if solve(a) != True:
		for i in range(len(a)):
			if a[i] != 0:
				count += 1
		print(count)
		for i in range(len(a)):
			if a[i] != 0:
				count += 1
				print(str(a[i]) + '0' * (len(a) - i - 1), end=' ')
		print('')
	else:
		print(1)
		print(b)


for i in range(int(input())):
	x = input()
	lyst = []
	for j in range(len(x)):
		if x[j] != '0':
			lyst.append(x[j] + '0' * (len(x) - j - 1))
	print(len(lyst))
	print(*lyst)


for i in range(int(input())):
	n = int(input())
	p = 10
	i = 0
	j = 0
	l = []
	while n != 0:
		a = n % p
		if a != 0:
			j += 1
			l.append(a * 10 ** i)
		n = n // p
		i += 1
	print(j)
	print(' '.join(map(str, l)))


t = int(input())
for _ in range(t):
	num = int(input())
	(res, power) = ([], 1)
	while num > 0:
		if num % 10 > 0:
			temp = num % 10 * power
			res.append(temp)
		num = num // 10
		power *= 10
	res = [int(i) for i in res]
	print(len(res))
	print(*res)


try:
	t = int(input())
	for i in range(t):
		n = input()
		l = []
		for i in range(len(n)):
			if n[i] != '0':
				x = '0' * (len(n) - i - 1)
				ans = n[i] + x
				l.append(ans)
		print(len(l))
		for i in l:
			print(i, end=' ')
		print()
except EOFError:
	pass


for i in range(int(input())):
	num = int(input())
	num = str(num)
	ans = []
	count = 0
	length = len(num)
	for ele in num:
		if ele != '0':
			ans.append(int(ele) * pow(10, length - 1))
			count += 1
		length -= 1
	print(count)
	print(*ans)


t = int(input())
for i in range(t):
	n = input()
	l = len(n)
	k = l - 1
	c = 0
	num = []
	for i in range(l):
		if n[i] != '0':
			c += 1
			a = int(n[i])
			for i in range(k):
				a = a * 10
			num.append(str(a))
		k -= 1
	s = ' '.join(num)
	print(c)
	print(s)


from collections import deque
t = int(input())
rez = []
for i in range(t):
	p = ''
	k = 0
	n = input()
	j = len(n) - 1
	j1 = 0
	while j >= 0:
		gh = int(n[j])
		if gh != 0:
			k += 1
			p += str(gh * 10 ** j1) + ' '
		j -= 1
		j1 += 1
	rez.append(k)
	rez.append(p)
for i in range(len(rez)):
	print(rez[i])


for i in range(int(input())):
	n = input()
	k = 0
	a = []
	for j in n:
		k = k + 1
		if j != '0':
			a.append(j + (len(n) - k) * '0')
	print(len(a))
	print(' '.join(a))


def fname(n):
	ans = []
	for i in range(len(str(n))):
		if n % 10 != 0:
			ans.append(n % 10 * 10 ** i)
		n = n // 10
	return (ans, len(ans))
t = int(input())
for i in range(t):
	n = int(input())
	(answer, kol) = fname(n)
	print(kol)
	print(*answer)


t = int(input())
for _ in range(t):
	n = input()
	le = len(n)
	ans = set()
	for i in range(le):
		ans.add(int(n[i]) * 10 ** (le - 1 - i))
	if 0 in ans:
		ans.remove(0)
	print(len(ans))
	print(*ans)


test_case = int(input())
while test_case:
	n = list(input())
	length = len(n) - 1
	summnads = [int(a) * 10 ** (length - idx) for (idx, a) in enumerate(n) if a != '0']
	print(len(summnads))
	print(*summnads)
	test_case -= 1


for _ in range(int(input())):
	n = int(input())
	r = []
	rev = 0
	i = 0
	while n:
		rem = n % 10
		if rem:
			r.append(rem * 10 ** i)
		i += 1
		n //= 10
	print(len(r))
	for each in r:
		print(each, end=' ')
	print()


t = int(input())
while t:
	n = int(input())
	s = str(n)
	l = []
	for i in s:
		l.append(i)
	z = len(l)
	if n == 10 or n == 20 or n == 30 or (n == 40) or (n == 50) or (n == 60) or (n == 70) or (n == 80) or (n == 90) or (n == 10 ** z):
		print(1)
		print(n)
	else:
		l2 = []
		l3 = l[::-1]
		for i in range(len(l3)):
			z = int(l3[i]) * 10 ** i
			l2.append(z)
		l4 = [i for i in l2 if i != 0]
		print(len(l4))
		print(*l4)
	t = t - 1


for _ in range(int(input())):
	x = int(input())
	ans = []
	if x < 10:
		print(1)
		print(x)
	else:
		x1 = str(x)
		for i in range(len(x1) - 1, -1, -1):
			if x1[i] != '0':
				ans.append(x1[i] + '0' * (len(x1) - 1 - i))
		print(len(ans))
		print(' '.join((i for i in ans)), end='\n')


number = int(input())
for i in range(number):
	alist = []
	need = input()
	for p in range(1, len(need) + 1):
		alist.append(need[-p:])
		non = list(need)
		non[-p] = '0'
		need = ''.join(non)
	finalist = set(map(int, alist))
	if 0 in finalist:
		finalist.remove(0)
	newlist = [str(x) for x in finalist]
	print(len(newlist))
	print(' '.join(newlist))


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)


t = int(input())
for q in range(t):
	l = []
	c = 0
	l1 = []
	n = input()
	k = len(n) - 1
	for i in range(len(n)):
		if n[i] != 0:
			l.append(int(n[i]) * 10 ** k)
		k -= 1
	for j in range(len(l)):
		if l[j] != 0:
			c = c + 1
			l1.append(l[j])
	print(c)
	for p in l1:
		print(p, end=' ')


for t in range(int(input())):
	n = int(input())
	rem = 0
	t = 10
	ans = []
	while n:
		rem = n % t
		if rem != 0:
			ans.append(rem)
		n = n - rem
		t = t * 10
	print(len(ans))
	for i in range(len(ans)):
		print(ans[i], end=' ')
	ans.clear


import math
t = int(input())

def fn():
	n = int(input())
	i = 0
	ans = list()
	while n:
		if n % 10:
			ans.append(n % 10 * 10 ** i)
		n = n // 10
		i += 1
	print(len(ans))
	print(*ans)
while t:
	t -= 1
	fn()


def main():
	t = int(input())
	arr = []
	for i in range(t):
		temp = input()
		arr.append(temp)
	for j in range(t):
		roundnumbers(arr[j])

def roundnumbers(number):
	revnumber = number[::-1]
	arr = []
	for i in range(len(number)):
		if revnumber[i] != '0':
			temp = revnumber[i] + '0' * i
			arr.append(temp)
	print(len(arr))
	for i in arr:
		print(i, end=' ')
	print()
main()


l = [int(input()) for _ in range(int(input()))]
for n in l:
	r = 0
	for i in str(n):
		if i != '0':
			r += 1
	print(r)
	r = 0
	while n > 0:
		if n % 10 != 0:
			print(n % 10 * 10 ** r, end=' ')
		r += 1
		n = n // 10
	print()


t = int(input())
while t:
	n = input()
	ls = []
	temp = n[0]
	for i in range(1, len(n)):
		if n[i] != '0':
			ls.append(temp + (len(n) - i) * '0')
			temp = n[i]
		else:
			temp += n[i]
	if len(temp):
		ls.append(temp)
	print(len(ls))
	print(*ls)
	t -= 1


t = int(input())
for T in range(t):
	n = int(input())
	ans = []
	mul = 1
	while n > 0:
		v = n % 10 * mul
		if v > 0:
			ans.append(v)
		n //= 10
		mul *= 10
	print(len(ans))
	ans.reverse()
	print(*ans)


num_inputs = int(input())
for current_case in range(num_inputs):
	ans = str(input())
	answer_list = []
	for current_index in range(len(ans)):
		if ans[current_index] != '0':
			number = len(ans) - current_index - 1
			answer_list.append(str(ans[current_index] + '0' * number))
	print(len(answer_list))
	print(' '.join(answer_list))


def sol(n):
	m = n
	d = 10
	l = []
	while n > 0:
		if n % d != 0:
			l.append(n % d)
		n = n - n % d
		d = d * 10
	if sum(l) == m:
		print(len(l))
		[print(x, end=' ') for x in l]
t = int(input())
for _ in range(t):
	n = int(input())
	sol(n)


t = int(input())
for _ in range(t):
	n = int(input())
	s = str(n)
	ln = len(s)
	ans = []
	for i in range(ln):
		x = int(s[ln - i - 1]) * 10 ** i
		if x != 0:
			ans.append(x)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
for tc in range(t):
	n = input()
	le = len(n)
	co = n.count('0')
	print(le - co)
	for j in n:
		if j != '0':
			x = int(j)
			for g in range(le - 1):
				x *= 10
			print(x, end=' ')
		le -= 1
	print()


def answer(n):
	summands = []
	digits = list(str(n))
	length = len(digits)
	for i in range(length):
		if digits[i] != '0':
			summands.append(int(digits[i]) * 10 ** (length - i - 1))
	return summands
t = int(input())
for _ in range(t):
	n = int(input())
	print(len(answer(n)))
	print('\n'.join(map(str, answer(n))))


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
t = int(input())
for _ in range(t):
	n = int(input())
	x = 1
	res = []
	while n:
		if n % 10:
			res.append(n % 10 * x)
		n //= 10
		x *= 10
	print(len(res))
	print(' '.join(map(str, res)))


n = int(input())
for i in range(n):
	x = int(input())
	if x > 10:
		p = 0
		num = 0
		a = []
		while x != 0:
			r = x % 10
			x = x // 10
			if r != 0:
				num += 1
				number = r * 10 ** p
				a.append(number)
			p += 1
		print(num)
		for i in a:
			print(i, end=' ')
		print()
	else:
		print('1')
		print(x)


t = int(input())
for j in range(t):
	n = int(input())
	a = []
	i = 0
	while n >= 10:
		if n % 10 != 0:
			a.append(n % 10 * 10 ** i)
		n = n // 10
		i += 1
	a.append(n % 10 * 10 ** i)
	print(len(a))
	print(*a, sep=' ')


t = int(input())
for i in range(t):
	n = str(input())
	print(len(n.replace('0', '')))
	k = []
	for j in range(len(n)):
		if n[j] != '0':
			k.append(n[j] + '0' * (len(n) - j - 1))
	print(*k)


for _ in range(int(input())):
	n = int(input())
	a = list()
	i = 0
	while n:
		x = n % 10
		if x:
			a += (x * 10 ** i,)
		i += 1
		n //= 10
	print(len(a))
	print(*a)


def solve_round_numbers(number: int) -> None:
	string_numbers = str(number)[::-1]
	number_list = []
	for i in range(len(string_numbers)):
		number_list.append(int(string_numbers[i]) * 10 ** i)
	number_list = [x for x in number_list if x != 0]
	print(len(number_list))
	for number in number_list:
		print(number, end=' ')
	print('\n')

def main():
	cases = int(input())
	for _ in range(cases):
		solve_round_numbers(int(input()))
main()


t = int(input())
while t > 0:
	t -= 1
	s = input()
	l = len(s) - 1
	string = ''
	for i in s:
		if int(i) > 0:
			string += str(int(i) * 10 ** l) + ' '
		l -= 1
	string = string[:len(string) - 1]
	l2 = len(string.split(' '))
	print(l2)
	print(string)


t = int(input())
while t:
	t -= 1
	n = input()
	if len(n) == 1:
		print(1)
		print(n)
	else:
		num = []
		for i in range(len(n)):
			if n[i] != '0':
				num.append(n[i] + '0' * (len(n) - i - 1))
		print(len(num))
		for i in range(len(num)):
			print(num[i], end=' ')
		print()


t = int(input())
for i in range(t):
	n = input()
	op = []
	c = 0
	num = [i for i in n]
	for j in range(len(num)):
		f = int(num[j]) * pow(10, len(num) - j - 1)
		if f != 0:
			op.append(str(f))
			c += 1
	res = ' '.join(op)
	print(c)
	print(res)


t = int(input())
for i in range(t):
	n = input()
	if n[1:].count('0') == len(n[1:]):
		print(1)
		print(n)
		continue
	digits = len(n) - n.count('0')
	cur = len(n) - 1
	ans = []
	for x in n:
		if x == '0':
			cur -= 1
			continue
		else:
			ans.append(str(int(x) * 10 ** cur))
			cur -= 1
	print(digits)
	print(' '.join(ans))


t = int(input())
for _ in range(t):
	str1 = input()
	n = int(str1)
	len1 = len(str1)
	temp = 1
	list1 = []
	for i in range(len1 - 1, -1, -1):
		temp1 = (ord(str1[i]) - 48) * temp
		if temp1 != 0:
			list1.append(temp1)
		temp = temp * 10
	len2 = len(list1)
	print(len2)
	for i in range(len2):
		if i != len2 - 1:
			print(list1[i], end=' ')
		else:
			print(list1[i])


for _ in range(int(input())):
	n = input()
	ans = [c for c in n if c != '0']
	print(len(ans))
	for i in range(len(n)):
		c = n[len(n) - i - 1]
		if c != '0':
			print(c + '0' * i, end=' ')
	print()


t = int(input())
elem = []
res = []
for i in range(t):
	n = int(input())
	elem.append(n)
for i in range(t):
	s = list(str(elem[i]))[::-1]
	g = 0
	u = -1
	q = []
	for j in s:
		u += 1
		if j != '0':
			q.append(j + '0' * u)
	res.append([len(q), q])
for i in res:
	print(i[0])
	print(' '.join(i[1]))


t = int(input())
for i in range(t):
	n = int(input())
	s = str(n)
	li = []
	l = []
	co = 0
	for j in range(len(s)):
		li.append(int(s[j]) * 10 ** (len(s) - j - 1))
	for k in range(len(li)):
		if str(li[k])[0] != '0':
			co += 1
			l.append(li[k])
	print(co)
	print(*l)


t = int(input())
for i in range(t):
	n = int(input())
	List = []
	List_1 = []
	for j in range(len(str(n))):
		List.append(10 ** (len(str(n)) - 1) * (n // 10 ** (len(str(n)) - 1)))
		n = n - n // 10 ** (len(str(n)) - 1) * 10 ** (len(str(n)) - 1)
	for m in range(len(List)):
		if List[m] != 0:
			List_1.append(List[m])
	print(len(List_1))
	for k in range(len(List_1) - 1):
		print(List_1[k], end=' ')
	print(List_1[len(List_1) - 1])


import sys
input = sys.stdin.readline
output = sys.stdout

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def solve(n):
	list1 = []
	count = 0
	while n != 0:
		rem = n % 10
		n = n // 10
		rem *= pow(10, count)
		if rem != 0:
			list1.append(str(rem))
		count += 1
	return list1
n = inp()
for i in range(n):
	res = solve(inp())
	length = len(res)
	output.write(str(length) + '\n')
	output.write(' '.join(res) + '\n')


tc = int(input())
for _ in range(tc):
	x = int(input())
	poww = 1
	ans = []
	while x > 0:
		digit = x % 10
		if digit != 0:
			ans.append(digit * poww)
		x //= 10
		poww *= 10
	print(len(ans))
	print(*ans)


number_of_test_cases = int(input())
for i in range(number_of_test_cases):
	n = list(input())
	number_of_digits = len(n)
	number_of_zeros = n.count('0')
	number_of_non_zeros = number_of_digits - number_of_zeros
	print(number_of_non_zeros)
	for j in range(number_of_digits):
		g = n[j]
		number_of_zeros_to_add = number_of_digits - j - 1
		if g != '0':
			print(g + '0' * number_of_zeros_to_add, end=' ')
	print()


class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from bisect import bisect_right, bisect_left
from fractions import Fraction

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def pari(a):
	for i in range(0, 2, n):
		print(i)
	for i in range(1, 2, n):
		print(i)
from math import gcd

def lcm(a, b):
	return a * b // gcd(a, b)

def f(n, a=1):
	if a == 1:
		a = []
	s = len(str(n))
	p = 10 ** (s - 1)
	ans = 1
	a += [n // p * p]
	n -= a[0]
	if n:
		ans += 1
		a += f(n)
		return a
	else:
		return a
for _ in range(int(input())):
	n = int(input())
	a = f(n)
	print(len(a))
	print(' '.join((str(k) for k in a)))


for _ in range(int(input())):
	n = input()
	l = []
	for i in range(len(n) - 1, -1, -1):
		if n[i] == '0':
			pass
		else:
			l.append(n[i] + '0' * (len(n) - 1 - i))
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	n = input()
	if int(n) < 10:
		print(1)
		print(n)
	else:
		a = []
		l = len(n)
		for i in range(l - 1):
			if int(n[i]) != 0:
				a.append(n[i] + '0' * (l - i - 1))
		if n[-1] != '0':
			a.append(n[-1])
		print(len(a))
		print(*a)


n = int(input())
for i in range(n):
	x = input()
	arr = []
	l = 1
	for j in x:
		if not j == '0':
			arr.append(str(j) + '0' * (len(x) - l))
		l += 1
	print(len(arr))
	final_answer = ''
	for st in arr:
		final_answer += st + ' '
	print(final_answer)


L = []
N = []
for _ in range(int(input())):
	x = input()
	if x[0] != '0':
		if len(x) == 1 and int(x) > 0:
			L.append(1)
			N.append(x)
		else:
			s = [x[i] + '0' * len(x[i + 1:]) for i in range(len(x)) if x[i] != '0']
			L.append(len(s))
			N.append(s)
for e in range(len(N)):
	print(L[e])
	print(*N[e], sep=' ')


t = int(input())

def sum_of_rounds(n):
	if n < 10:
		print(1)
		print(n)
		return
	k = 0
	ns = str(n)
	rounds = ''
	for i in range(len(ns)):
		cn = int(ns[i])
		if cn > 0:
			if i == len(ns) - 1:
				r = str(cn)
			else:
				r = cn * pow(10, len(ns[i + 1:]))
			rounds += '%s ' % r
			k += 1
	print(k)
	print(rounds)
for _ in range(t):
	n = int(input())
	sum_of_rounds(n)


for _ in range(int(input())):
	n = int(input())
	res = []
	mul = 1
	c = 0
	while n > 0:
		if n % 10 != 0:
			c = c + 1
			res.append(n % 10 * mul)
		n = n // 10
		mul = mul * 10
	print(c)
	for i in res:
		print(i, end=' ')
	print()


def getremainder(n):
	r = n % 10
	if r >= 0:
		return r
	else:
		return False

def digits(n):
	count = 0
	while n > 0:
		n = n // 10
		count += 1
	return count
for _ in range(int(input())):
	n = int(input())
	digit = digits(n)
	M = []
	while digits(n) != 0:
		remain = getremainder(n)
		if remain != 0:
			res = remain * pow(10, digit - digits(n))
			M.append(res)
		n = n // 10
	print(len(M))
	for ans in M:
		print(ans, end=' ')
	print()


import math
t = int(input())
while t > 0:
	a = int(input())
	list1 = []
	digits = int(math.log10(a)) + 1
	for i in range(digits):
		x = a % 10
		z = x * 10 ** i
		a = a // 10
		if z > 0:
			list1.append(z)
	print(len(list1))
	print(*list1)
	t = t - 1


import sys
ip = lambda : sys.stdin.readline()
ipl = lambda : sys.stdin.readline().split()
for _ in range(int(ip())):
	n = int(input())
	res = []
	k = 1
	while n:
		if n % 10 != 0:
			res.append(n % 10 * k)
		n //= 10
		k *= 10
	print(len(res))
	res.sort(reverse=True)
	print(*res)


def closest(n):
	mult = 1
	while mult * 10 <= n:
		mult *= 10
	return mult
for i in range(int(input())):
	(buff, counter) = ([], 0)
	n = int(input())
	while n != 0:
		counter += 1
		buff.append(closest(n) * (n // closest(n)))
		n = n % closest(n)
	print(counter)
	print(' '.join([str(elem) for elem in buff]))


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)


nt = int(input())
for _ in range(nt):
	n = int(input())
	l = []
	no = 10
	while True:
		if n % no != 0:
			l.append(n % no)
			n -= n % no
		no *= 10
		if no >= n:
			if n != 0:
				l.append(n)
			break
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


for i in range(int(input())):
	a = list(map(int, input()))[::-1]
	n = len(a)
	ans = []
	for i in range(n):
		if a[i] != 0:
			ans.append(a[i] * pow(10, i))
	print(len(ans))
	print(*ans)


for t in range(int(input())):
	n = int(input())
	p = 1
	l = []
	while n != 0:
		d = n % 10
		d = d * p
		if d != 0:
			l.append(d)
		n = n // 10
		p *= 10
	print(len(l))
	print(' '.join(list(map(str, l))))


def solve(n):
	summs = []
	num = str(n)
	length = len(num)
	count = 0
	for (i, j) in enumerate(num):
		if j == '0':
			continue
		else:
			summs.append(int(j) * pow(10, length - i - 1))
			count += 1
	return (count, summs)
t = int(input())
for i in range(t):
	num = int(input())
	(k, sums) = solve(num)
	print(k)
	for (i, j) in enumerate(sums):
		print(j, end='')
		if i != k - 1:
			print(' ', end='')
	print()


t = int(input())
for i in range(t):
	a = input()
	array = []
	for m in range(len(a)):
		if a[m] != '0':
			array.append(a[m] + '0' * (len(a) - m - 1))
	print(len(array))
	print(' '.join(array))


def main():
	t = int(input())
	for i in range(t):
		case = int(input())
		answer = ' '
		addends = 0
		for digit in range(len(str(case))):
			face_value = case // 10 ** digit % 10
			if face_value != 0:
				place_value = face_value * 10 ** digit
				answer = str(place_value) + ' ' + answer
				addends += 1
		print(addends)
		print(answer)
main()


T = int(input())
for _ in range(T):
	n = int(input())
	x = 10
	sol = []
	while x <= n * 10:
		if n % x == 0:
			x *= 10
		else:
			sol.append(str(n % x))
			n -= n % x
	print(len(sol))
	print(' '.join(sol))


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


t = int(input())
for _ in range(t):
	n = int(input())
	cvt = str(n)
	nums = []
	for i in range(len(cvt)):
		num = int(cvt[i]) * 10 ** (len(cvt) - i - 1)
		if num != 0:
			nums.append(num)
	print(len(nums))
	print(' '.join(map(str, nums)))


t = int(input())
for _ in range(t):
	n = int(input())
	te = {'0'}
	ans1 = []
	l = [i for i in range(len(str(n)), 0, -1)]
	if set(str(n)[1:]) == te:
		print(1)
		print(n)
	else:
		j = 0
		ans = 0
		for i in str(n):
			if pow(10, l[j] - 1) * int(i) != 0:
				ans += 1
				ans1.append(pow(10, l[j] - 1) * int(i))
			j += 1
		print(ans)
		for i in ans1:
			print(i, end=' ')
		print()


def solve():
	t = int(input())
	for i in range(t):
		n = int(input())
		n = str(n)
		ans = []
		for j in range(len(n)):
			if n[j] != '0':
				ans.append(n[j] + (len(n) - j - 1) * '0')
		print(len(ans))
		print(*ans)
solve()


t = int(input())
answerCount = []
answerNums = []
while t > 0:
	num = input()
	if int(num) in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] or num[1:] == '0' * (len(num) - 1):
		answerCount.append(1)
		answerNums.append([num])
	else:
		terms = []
		for i in range(len(num)):
			if num[i] != '0':
				term = int(num[i]) * 10 ** (len(num) - 1 - i)
				terms.append(str(term))
		answerNums.append(terms)
		answerCount.append(len(terms))
	t -= 1
for i in range(len(answerCount)):
	print(answerCount[i])
	print(' '.join(answerNums[i]))


for _ in range(int(input())):
	num = int(input())
	c = 1
	pos_nums = []
	while num != 0:
		z = num % 10
		pos_nums.append(z * c)
		num = num // 10
		c = c * 10
	val = [p for p in pos_nums if p != 0]
	print(len(val))
	print(*val, sep=' ')


for _ in range(int(input())):
	n = input()
	ans = []
	i = 0
	while i < len(n):
		if int(n[i]) != 0:
			ans.append(n[i] + '0' * (len(n) - 1 - i))
		i += 1
	print(len(ans))
	print(' '.join(ans))


n = int(input())
for i in range(n):
	x = int(input())
	x1 = len(str(x))
	y = str(x)
	z = []
	l = []
	for i in range(1, x1 + 1):
		l.append(x % 10 ** i)
		x = x - x % 10 ** i
	for i in range(len(l)):
		if l[i] > 0:
			z.append(l[i])
	print(len(z))
	print(*z)


from fractions import Fraction
import bisect
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
for _ in range(iinput()):
	n = str(iinput())
	ans = []
	temp = 0
	for i in range(len(n) - 1, -1, -1):
		if n[i] == '0':
			temp += 1
			continue
		ans.append(n[i] + '0' * temp)
		temp += 1
	print(len(ans))
	print(*ans)


t = int(input())
while t:
	n = int(input())
	k = 10
	ans = []
	while n:
		p = n % 10
		if p != 0:
			ans.append(p * int(k / 10))
		n = int(n / 10)
		k *= 10
	print(len(ans))
	print(*ans)
	t -= 1


n = int(input())
for i in range(n):
	s = input()
	sum = 0
	arrr = []
	for i in range(len(s)):
		s1 = s[i] + '0' * (len(s) - i - 1)
		s1 = int(s1)
		if s1 > 0:
			arrr.append(s1)
	print(len(arrr))
	for i in range(len(arrr)):
		print(arrr[i], end=' ')
	print()


t = int(input())
while t:
	n = int(input())
	count = 0
	list1 = []
	while n > 0:
		if n % 10 != 0:
			list1.append(n % 10 * 10 ** count)
		n //= 10
		count += 1
	print(len(list1))
	for i in list1:
		print(i, end=' ')
	print()
	t -= 1


for _ in range(int(input())):
	n = int(input())
	ans = []
	for k in range(6):
		if n % 10 ** k != 0:
			ans.append(n % 10 ** k)
			n -= n % 10 ** k
	print(len(ans))
	print(*ans)


import sys
for t in range(int(sys.stdin.readline())):
	out = []
	a = sys.stdin.readline()[:-1]
	for c in a:
		if c != '0':
			out.append('{}{}'.format(c, '0' * (len(a) - 1)))
		a = a[1:]
	sys.stdout.write('{}\n'.format(len(out)))
	sys.stdout.write('{}\n'.format(' '.join(out)))


for _ in range(int(input())):
	n = input()
	result = ''
	j = 0
	for i in range(len(n)):
		if n[i] != '0':
			result += n[i] + '0' * (len(n) - i - 1) + ' '
			j += 1
	print(j)
	print(result[:-1])


t = int(input())
while t != 0:
	t -= 1
	n = input()
	if len(n) == 1:
		print(1)
		print(n)
	elif n[1:] == '0' * (len(n) - 1):
		print(1)
		print(n)
	else:
		lt = []
		for i in range(len(n)):
			if n[i] != '0':
				k = n[i] + '0' * (len(n) - 1 - i)
				lt.append(k)
		print(len(lt))
		print(*lt)


import sys

def number_to_summands(number_str):
	summands = set()
	for i in range(len(number_str)):
		if number_str[i] != '0':
			summand = '{}{}'.format(number_str[i], '0' * len(number_str[i + 1:]))
			summands.add(summand)
	return summands
lines = sys.stdin.read().split()
k = int(lines[0])
results = [number_to_summands(number) for number in lines[1:]]
for summands in results:
	print(len(summands))
	print(' '.join(summands))


def solve(s):
	a = list()
	for i in range(len(s)):
		if s[i] != '0':
			a.append(int(s[i] + '0' * (len(s) - i - 1)))
	return a
for j in range(int(input())):
	n = input()
	print(len(solve(n)))
	for i in solve(n):
		print(i, end=' ')
	print()


def solve(n, ans):
	arr = []
	n = str(n)
	for i in range(len(n)):
		if n[i] != '0':
			arr.append(int(n[i]) * pow(10, len(n) - i - 1))
	ans.append(arr)

def main():
	t = int(input())
	ans = []
	for i in range(t):
		n = int(input())
		solve(n, ans)
	for i in ans:
		print(len(i))
		for j in i:
			print(j, end=' ')
		print()
main()


t = int(input())
for _ in range(t):
	s = input()
	su = []
	for (i, c) in enumerate(s[::-1]):
		if c != '0':
			su += [int(c) * 10 ** i]
	print(len(su))
	print(*su)


T = int(input())
while T > 0:
	T = T - 1
	n = int(input())
	x = list(map(int, str(n)))
	X = []
	for i in range(0, len(x)):
		p = x[i] * pow(10, len(x) - 1 - i)
		if p != 0:
			X.append(p)
	print(len(X))
	for k in range(0, len(X)):
		print(X[k], end=' ')
	print('')


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


t_cases = int(input())
for case in range(t_cases):
	value = int(input())
	components = []
	while value > 0:
		unit = 10 ** (len(str(value)) - 1)
		residue = value // unit
		components.append(residue * unit)
		value -= residue * unit
	print(len(components))
	for i in components:
		print(i, end=' ')


t = int(input())
for _ in range(t):
	n = int(input())
	num = n
	arr = []
	if n >= 10000:
		ans = 10000 * (n // 10000)
		arr.append(ans)
		n -= ans
	if n >= 1000:
		ans = 1000 * (n // 1000)
		arr.append(ans)
		n -= ans
	if n >= 100:
		ans = 100 * (n // 100)
		arr.append(ans)
		n -= ans
	if n >= 10:
		ans = 10 * (n // 10)
		arr.append(ans)
		n -= ans
	if 0 < n < 10:
		arr.append(n)
	print(len(arr))
	print(*arr)


for _ in range(int(input())):
	n = str(input())
	p = []
	j = len(n)
	for x in n:
		p1 = int(x + '0' * (j - 1))
		j -= 1
		if p1 != 0:
			p.append(p1)
	print(len(p))
	print(*p)


t = int(input())
for i in range(t):
	n = int(input())
	arr = []
	count = 0
	while n:
		a = n % 10
		n = n // 10
		if a != 0:
			arr.append(a * 10 ** count)
			count = count + 1
		else:
			count = count + 1
	l = len(arr)
	print(l)
	for j in range(l):
		print(arr[j], end=' ')
	print(' ')


def isRound(n):
	if n == 0:
		return False
	if n >= 1 and n <= 9:
		return True
	elif n % 10 == 0:
		return True
	else:
		return False
t = int(input())
while t > 0:
	n = int(input())
	res = []
	power = 1
	while n > 0:
		dig = n % 10
		if isRound(dig * power):
			res.append(dig * power)
		power *= 10
		n //= 10
	print(len(res))
	print(*res)
	t -= 1


n = int(input())
a = []
b = [[] for i in range(n)]
for i in range(n):
	a.append(int(input()))
k = 10
for i in range(n):
	while a[i] != 0:
		d = a[i] % k
		if d != 0:
			b[i].append(str(d))
		k = k * 10
		a[i] -= d
	k = 10
for i in range(n):
	print(len(b[i]))
	print(' '.join(b[i]))


for _ in range(int(input())):
	n = int(input())
	stringn = str(n)
	arr = list()
	x = 0
	for i in range(len(stringn) - 1, -1, -1):
		if stringn[i] != '0':
			arr.append(int(stringn[i]) * pow(10, x))
		x += 1
	print(len(arr))
	for ele in arr:
		print(ele, end=' ')
	print()


for __ in range(int(input())):
	(n, i) = (int(input()), 0)
	ans = []
	while n > 0:
		x = n % 10 * 10 ** i
		if x > 0:
			ans.append(x)
		(i, n) = (i + 1, n // 10)
	print(len(ans))
	print(*ans)


import math

def round(n):
	if len(n) == 1:
		return 1
	else:
		c = 0
		for i in range(1, len(n)):
			if n[i] != 0:
				break
			else:
				c = c + 1
		if c == len(n) - 1:
			return 1
		else:
			return 0
t = int(input())
while t:
	t = t - 1
	n = input()
	if round(n) == 1:
		print(1)
		print(int(n))
	else:
		l = []
		for i in range(len(n)):
			if n[len(n) - i - 1] != 0:
				x = int(n[len(n) - i - 1]) * int(math.pow(10, i))
				if x != 0:
					l.append(x)
		print(len(l))
		for i in l:
			print(i, end=' ')
		print()


no = int(input())
li = []
li2 = []
for i in range(0, no):
	li.append(int(input()))
for i in li:
	temp = i
	tl = []
	while temp != 0:
		tl.append(temp % 10)
		temp = temp // 10
	temp = i
	tl2 = []
	while tl != []:
		if tl[len(tl) - 1] == 0:
			tl.pop()
		else:
			mul = tl[len(tl) - 1] * pow(10, len(tl) - 1)
			tl2.append(mul)
			temp = temp - mul
			tl.pop()
	li2.append(tl2)
for i in li2:
	print(len(i))
	for j in i:
		if j != i[len(i) - 1]:
			print(j, end=' ')
		else:
			print(j)


t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	g = []
	i = 0
	while n != 0:
		if n % 10 == 0:
			i += 1
			n = n // 10
			continue
		else:
			g.append(n % 10 * int(pow(10, i)))
		n = n // 10
		i += 1
	print(len(g))
	for i in range(len(g) - 1, -1, -1):
		print(g[i], end=' ')
	print()


n = int(input())
v = 0
while v < n:
	d = ''
	(c, a) = (0, 0)
	s = input()
	le = len(s)
	for i in s:
		a += 1
		if int(i + '0' * (le - a)) != 0:
			d += str(i + '0' * (le - a) + ' ')
			c += 1
	d = d[0:-1]
	print(c)
	print(d)
	v += 1


n = int(input())
for i in range(n):
	num = int(input())
	ans = []
	t = 0
	while num:
		k = num % 10
		if k:
			ans.append(k * 10 ** t)
		num //= 10
		t += 1
	flag = 0
	print(len(ans))
	for ii in ans:
		if flag:
			print(' ', end='')
		print(ii, end='')
		flag = 1
	print()


from sys import stdin
input = iter(stdin.readlines()).__next__
t = int(input())
for _ in range(t):
	n = int(input())
	rounds = []
	i = 0
	while n > 0:
		digit = n % 10
		if digit != 0:
			exp = int(10 ** i)
			rounds.append(digit * exp)
		i += 1
		n = n // 10
	print(len(rounds))
	print(*rounds)


for _ in range(int(input())):
	n = int(input())
	if n < 10:
		print('1')
		print(n)
	else:
		l = []
		x = 0
		while n:
			c = n % 10
			if c != 0:
				l.append(c * 10 ** x)
			x = x + 1
			n = n // 10
		print(len(l))
		print(*l)


t = int(input())
A = []
for i in range(t):
	A = A + [input()]
for i in range(t):
	n = A[i]
	B = []
	a = len(n) - 1
	for j in n:
		if int(j) == 0:
			a = a - 1
		else:
			B = B + [j + '0' * a]
			a = a - 1
	print(len(B))
	for k in B:
		print(k, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	(ans, a) = ([], n)
	j = 0
	while int(a) != 0:
		if int(a) % 10 != 0:
			r = int(a) % 10 * 10 ** j
			ans.append(r)
		j += 1
		a /= 10
	print(len(ans))
	[print(i, sep=' ') for i in ans]


t = int(input())
for t in range(t):
	n = int(input())
	cnt = 0
	s = str(n)
	roundNums = []
	for i in range(len(s)):
		if s[i] != '0':
			cnt += 1
			roundNums.append(s[i] + '0' * (len(s) - i - 1))
	print(cnt)
	print(' '.join(roundNums))


for i in range(int(input())):
	a = input()
	x = []
	l = len(a)
	for j in range(l):
		b = int(a[j]) * 10 ** (l - j - 1)
		if b != 0:
			x.append(b)
	print(len(x))
	print(*x)


for _ in range(int(input())):
	n = int(input())
	(l, t) = ([], 1)
	for i in str(n)[::-1]:
		s = int(i) * t
		if s:
			l.append(s)
		t *= 10
	print(len(l))
	print(*l)


t = int(input())
for i in range(t):
	s = input()
	l = len(s)
	ro = []
	mro = []
	for j in range(l, 0, -1):
		if int(s[j - 1]) > 0:
			st = s[j - 1]
			if l - j > 0:
				st += '0' * (l - j)
			ro.append(st)
	print(len(ro))
	print(*ro, sep=' ')


def fun(n):
	data = []
	s = str(n)
	res = 0
	i = 0
	while n > 0:
		res = n % 10
		if res != 0:
			data.append(res * 10 ** i)
		n //= 10
		i += 1
	print(len(data))
	for i in data:
		print(i, end=' ')
	print('\n', end='')
n = int(input())
for i in range(n):
	fun(int(input()))


t = int(input())
for _ in range(0, t):
	n = int(input())
	n = str(n)
	n = list(n)
	count = 1
	for i in range(1, len(n)):
		if n[i] != '0':
			count += 1
	print(count)
	for i in range(0, len(n)):
		if n[i] != '0':
			z = len(n) - i - 1
			print(n[i], end='')
			for i in range(0, z):
				print('0', end='')
			print(end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	A = []
	cnt = 0
	while n > 0:
		m = n % 10
		if m != 0:
			A.append(m * 10 ** cnt)
		n = n // 10
		cnt += 1
	print(len(A))
	print(*A)


for _ in range(int(input())):
	n = input()
	rs = []
	for i in reversed(range(len(n))):
		if n[i] != '0':
			rs.append(int(n[i]) * 10 ** (len(n) - i - 1))
	print(len(rs))
	print(' '.join((str(i) for i in rs)))


t = int(input())
for i in range(t):
	l = []
	x = int(input())
	p = 1
	while x != 0:
		r = x % 10
		if r != 0:
			l.append(r * p)
		p = p * 10
		x = x // 10
	print(len(l))
	for j in l:
		print(j, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = input()
	l = len(n)
	r = []
	for i in range(l):
		if n[i] == '0':
			continue
		r.append(str(n[i]) + '0' * (l - i - 1))
	print(len(r))
	for i in r:
		print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	num = int(input())
	c = 0
	l = []
	mul = 1
	while num > 0:
		r = num % 10
		if r != 0:
			c += 1
			l.append(r * mul)
		num = num // 10
		mul *= 10
	l = list(map(str, l))
	print(c)
	print(' '.join(l))


numbers = []
true_numbers = []
count = int(input())
for i in range(count):
	n = input()
	numbers.append(n)
for i in numbers:
	if len(i) == 1:
		true_numbers.append(int(i))
	elif int(i) / (int(i[0]) * 10 ** (len(i) - 1)) == 1:
		true_numbers.append(i)
	else:
		bad_n = []
		counter = len(i) - 1
		for j in i:
			digit = int(j) * 10 ** counter
			if digit != 0:
				bad_n.append(str(digit))
			counter -= 1
		true_numbers.append(bad_n)
for q in true_numbers:
	if type(q) == type([]):
		print(len(q))
		print(' '.join(q))
	else:
		print(1)
		print(int(q))


(t, _) = (int(input()), 0)
while _ < t:
	n = int(input())
	(l, c) = ([], 0)
	while n != 0:
		if n % 10 * 10 ** c != 0:
			l.append(n % 10 * 10 ** c)
		c += 1
		n //= 10
	print(len(l))
	print(' '.join((str(x) for x in l)))
	_ += 1


n = int(input())

def maxs(m):
	s = 10
	c = 0
	lk = int(m)
	while lk % s == 0:
		c = c + 1
		s = s * 10
	return c
ww = []
for i in range(n):
	t = input()
	ww.append(t)
for i in ww:
	zero = list(i)
	r = len(zero)
	kl = 0
	for m in zero:
		if m == '0':
			kl = kl + 1
	print(r - kl)
	cc = 0
	zz = []
	while cc < r:
		if zero[cc] == '0':
			cc = cc + 1
		else:
			lll = int(zero[cc]) * 10 ** (r - cc - 1)
			zz.append(lll)
			cc = cc + 1
	print(' '.join(map(str, zz)))


n = int(input())
d = []
for i in range(n):
	w = int(input())
	d.append(w)
for i in range(len(d)):
	n = str(d[i]).replace('', ' ').strip().split()
	k = 0
	t = []
	for j in range(len(n)):
		coz = j + 1
		if n[~j] != '0':
			t.append(str(int(n[~j]) * pow(10, coz - 1)))
			k += 1
	print(k)
	print(' '.join(t))


t = int(input())
for i in range(t):
	n = int(input())
	p = 1
	lst = []
	while n:
		if n % 10:
			lst.append(n % 10 * p)
		n = n // 10
		p *= 10
	print(len(lst))
	for i in lst:
		print(i, end=' ')


def wa(l):
	s = ''
	for i in range(0, l - 1, 1):
		s += '0'
	return s

def ans(s):
	l = []
	count = 0
	l2 = []
	d = int(s)
	f = len(s)
	while d != 0:
		r = d % 10
		if r != 0:
			count += 1
		l.append(r)
		d = d // 10
	l.reverse()
	print(count)
	for i in l:
		x = int(str(i))
		if x > 0:
			print(str(i) + wa(f), end=' ')
		f -= 1
	print()
t = int(input())
while t > 0:
	a = int(input())
	s = str(a)
	s1 = ''.join(reversed(s))
	d = int(s1)
	s2 = str(d)
	if len(s) == 1 or len(s2) == 1:
		print(1)
		print(a)
	else:
		ans(s)
	t -= 1


for num in range(int(input())):
	x = input()
	multiple = len(x) - 1
	print(len([n for n in x if n != '0']))
	for numb in x:
		y = int(numb) * 10 ** multiple
		if y != 0:
			print(y, end=' ')
		multiple -= 1
	print('\n', end='')


def check(n: int) -> list:
	if n == 0:
		return []
	n = str(n)
	ans = []
	for i in range(len(n)):
		a = int(n[i]) * 10 ** (len(n) - i - 1)
		if a:
			ans.append(a)
	return ans
t = int(input())
while t:
	n = int(input())
	ans = check(n)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 10:
		print('1')
		print(n)
	else:
		j = 1
		a = []
		while True:
			if n % 10 ** j != 0:
				a.append(n % 10 ** j)
				n = n - a[-1]
			if n / 10 ** j == 0:
				break
			j = j + 1
		print(len(a))
		print(*a)


a = int(input())
for i in range(0, a):
	b = int(input())
	arr = []
	while b > 0:
		arr.append(b % 10)
		b = b // 10
	brr = []
	for i in range(0, len(arr)):
		if not arr[i] == 0:
			brr.append(arr[i] * pow(10, i))
	print(len(brr))
	print(' '.join(list(map(str, brr))))


import sys
from typing import *
n: int = int(input())
inp: List[int] = map(int, sys.stdin.readlines())

def solution(x: int) -> (int, List[int]):
	i = -1
	x_copy = x
	sol_lst = []
	while x_copy != 0:
		d = x_copy % 10
		x_copy = int(x_copy / 10)
		i += 1
		if d != 0:
			sol_lst.append(d * 10 ** i)
	return (len(sol_lst), sol_lst)
from itertools import *
for (x, y) in map(solution, inp):
	print(x)
	print(' '.join(map(str, y)))


t = int(input())
for _ in range(t):
	n = input()
	pos = len(n) - 1
	mas = []
	while pos != -1:
		if n[pos] != '0':
			mas.append(n[pos] + '0' * (len(n) - pos - 1))
		pos -= 1
	print(len(mas))
	print(' '.join(reversed(mas)))


t = int(input())
for i in range(t):
	n = int(input())
	count = 0
	temp = n
	one = temp % 10
	if one != 0:
		count += 1
	temp -= one
	two = temp % 100
	if two != 0:
		count += 1
	temp -= two
	three = temp % 1000
	if three != 0:
		count += 1
	temp -= three
	four = temp % 10000
	if four != 0:
		count += 1
	temp -= four
	if one == two == three == four:
		print(1)
	else:
		print(count)
	if one != 0:
		print(one, end=' ')
	if two != 0:
		print(two, end=' ')
	if three != 0:
		print(three, end=' ')
	if four != 0:
		print(four, end=' ')
	if one == two == three == four:
		print(n, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 10:
		print(1)
		print(n)
	else:
		l = len(str(n))
		if str(n).count('0') == l - 1:
			print(1)
			print(n)
		else:
			output = []
			for i in range(l):
				if str(n)[i] != '0':
					output.append(str(n)[i] + '0' * (l - i - 1))
			print(len(output))
			print(*output)


from sys import *
from math import *
from sys import stdin, stdout
from collections import *
int_arr = lambda : list(map(int, stdin.readline().strip().split()))
str_arr = lambda : list(map(str, stdin.readline().split()))
get_str = lambda : map(str, stdin.readline().strip().split())
get_int = lambda : map(int, stdin.readline().strip().split())
get_float = lambda : map(float, stdin.readline().strip().split())
mod = 1000000007
setrecursionlimit(1000)

def ans(n):
	ct = 1
	lst = []
	while n != 0:
		rem = n % 10
		if rem * ct:
			lst += [rem * ct]
		n = n // 10
		ct *= 10
	print(len(lst), sep='\n')
	print(*lst)
for _ in range(int(input())):
	n = int(input())
	ans(n)


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


t = int(input())
for i in range(t):
	n = int(input())
	a = []
	p = 1
	while n:
		d = n % 10
		if d != 0:
			a.append(d * p)
		p *= 10
		n //= 10
	print(len(a))
	print(*a)


def main():
	T = int(input())
	for _ in range(T):
		s = input()
		l = len(s) - 1
		ret = []
		for c in s:
			if c != '0':
				ret.append(c + '0' * l)
			l -= 1
		print(len(ret))
		print(' '.join(ret))
main()


t = int(input())
while t > 0:
	s = input()
	l = len(s)
	s1 = ''
	for i in s:
		if i != '0':
			s1 = s1 + i
	m = len(s1)
	if m == 1:
		print(m)
		print(s)
	else:
		i = 0
		b = []
		print(m)
		while i < l:
			if s[i] != 0:
				temp = int(s[i]) * pow(10, l - i - 1)
				b.append(temp)
			i = i + 1
		for i in b:
			if i != 0:
				print(i, end=' ')
		print('\r')
	t = t - 1


t = int(input(''))
while t > 0:
	res = []
	n = int(input())
	p = 10
	k = 0
	string = ''
	while n != 0:
		s = n % p
		if s != 0:
			k += 1
			res.append(s)
		n = n - s
		p *= 10
	print(k)
	for i in res:
		string += str(i) + ' '
	print(string)
	t -= 1


I = lambda : list(map(int, input().split()))
(n,) = I()
for _ in range(n):
	(x,) = I()
	l = []
	m = 10 ** (len(str(x)) - 1)
	for i in str(x):
		if i != '0':
			l.append(int(i) * m)
		m //= 10
	print(len(l))
	print(*l)


for _ in range(int(input())):
	n = input()
	l = len(n)
	c = n.count('0')
	x = l - c
	if x == 1 and n[0] != '0':
		print(1)
		print(n)
	elif c == 0:
		a = []
		for i in range(l):
			a.append(n[i] + (l - (i + 1)) * '0')
		print(len(a))
		print(*a)
	else:
		a = []
		for i in range(l):
			if n[i] != '0':
				if l - i == 1:
					a.append(n[i])
				else:
					vr = n[i] + (l - (i + 1)) * '0'
					a.append(vr)
			elif n[i] == '0':
				pass
		print(len(a))
		print(*a)


t = int(input())
for i in range(t):
	x = int(input())
	string = str(x)
	l = len(string)
	c = l
	li = []
	for i in range(1, l + 1):
		ans = int(string[i - 1]) * pow(10, c - i)
		if int(ans) != 0:
			li.append(ans)
	co = len(li)
	print(co)
	for i in li:
		print(i, end=' ')
	print()


for i in range(int(input())):
	n = str(input())
	b = len(n)
	a = n.count('0')
	print(b - a)
	c = 0
	for j in range(b):
		if n[j] != '0':
			print(n[j] + '0' * (b - 1 - j), end=' ')
	print()


def solve(k):
	n = len(k) - 1
	answer = []
	for i in range(len(k)):
		if int(k[i]) != 0:
			answer.append(int(k[i]) * 10 ** (n - i))
	return answer
t = int(input())
out = []
for i in range(t):
	k = input()
	out.append(solve(k))
for row in out:
	print(len(row))
	print(' '.join(map(str, row)))


t = input()
for i in range(int(t)):
	cur = input()
	cnt = 0
	for j in cur:
		if j != '0':
			cnt += 1
	print(cnt)
	for j in range(len(cur) - 1):
		if cur[j] != '0':
			print(cur[j] + '0' * (len(cur) - j - 1) + ' ', end='')
	if cur[-1] != '0':
		print(cur[-1])
	else:
		print('')


import math
cases = int(input())
for i in range(cases):
	k = input()
	nums = 0
	length = len(k)
	for d in k:
		if d != '0':
			nums += 1
	print(nums)
	for j in range(length):
		if k[j] != '0':
			res = int(k[j])
			power = math.pow(10, length - j - 1)
			print(int(res * power), end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	c = 0
	lst = []
	j = 0
	while n > 0:
		if n % 10 != 0:
			r = n % 10 * 10 ** c
			lst.append(r)
		c += 1
		n = n // 10
	print(len(lst))
	for k in range(len(lst)):
		print(lst[k], end=' ')


x = int(input())
for i in range(0, x):
	a = input()
	counter = 0
	for x in range(0, len(a)):
		if a[x] != '0':
			counter += 1
	print(counter)
	for x in range(0, len(a)):
		if a[len(a) - x - 1] != '0':
			print(a[len(a) - x - 1], end='')
			print('0' * x, end=' ')


n = int(input())
tc = []
for i in range(n):
	inp = int(input())
	tc.append(inp)
sol = [len(tc)]
k = 0
for i in tc:
	j = 0
	print(len(str(i).replace('0', '')))
	while i != 0:
		rem = i % 10
		if rem != 0:
			print(rem * 10 ** j, end=' ')
		j = j + 1
		i = i // 10
	k = k + 1
	print()


def solve():
	n = int(input())
	string = str(n)
	t = 0
	for ele in string:
		if ele != '0':
			t += 1
	print(t)
	k = 1
	last = 0
	while n % 10 ** k != n:
		x = n % 10 ** k
		if x - last != 0:
			print(x - last, end=' ')
		k += 1
		last = x
	x = n % 10 ** k
	print(x - last)
t = int(input())
for i in range(t):
	solve()


for _ in range(int(input())):
	N = int(input())
	x = 1
	L = []
	while N:
		t = N % 10
		if t != 0:
			L.append(t * x)
		x = x * 10
		N = N // 10
	print(len(L))
	print(*L)


t = int(input())
for _ in range(t):
	n = int(input())
	s = str(n)
	l = len(s)
	a = []
	for i in range(len(s)):
		if s[i] != '0':
			y = s[i] + '0' * (l - 1 - i)
			a.append(y)
	print(len(a))
	print(' '.join(a))


for _ in range(int(input())):
	n = int(input())
	c = 1
	pos_nums = []
	while n != 0:
		z = n % 10
		pos_nums.append(z * c)
		n = n // 10
		c = c * 10
	pos_nums1 = list(filter(lambda a: a != 0, pos_nums))
	print(len(pos_nums1))
	print(*pos_nums1)


n = int(input())
for j in range(n):
	k = 0
	a = input()
	for g in a:
		if g != '0':
			k += 1
	print(k)
	l = len(a)
	for h in range(l - 1, -1, -1):
		if a[h] != '0':
			print(int(a[h]) * 10 ** (l - h - 1), end=' ')


t = int(input())
while t:
	n = input()
	it = len(n)
	list = []
	count = 0
	i = 0
	while i < it:
		if it - 1 - i == 0:
			temp = int(n[i])
			if temp != 0:
				count = count + 1
				list.append(temp)
		else:
			k = 1
			z = 10
			while k < it - 1 - i:
				z = z * 10
				k = k + 1
			temp = int(n[i])
			temp = temp * z
			if temp != 0:
				count = count + 1
				list.append(temp)
		i = i + 1
	print(count)
	for item in list:
		if item != 0:
			print(item, end=' ')
	print('')
	t = t - 1


for _ in range(int(input())):
	r = input()
	a = [int(j) * 10 ** i for (i, j) in enumerate(r[::-1]) if int(j) != 0]
	print(len(a))
	print(*a)


for i in range(int(input())):
	x = int(input())
	dec = 1
	s = []
	for j in range(5):
		digit = x % 10
		if digit:
			s.append(digit * dec)
		dec *= 10
		x //= 10
	print(len(s))
	s = map(str, s)
	print(' '.join(s))


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


z = int(input())
while z > 0:
	n = int(input())
	s = str(n)
	(i, j) = (len(s) - 1, 0)
	(n1, t, l) = (s[-1], [], [])
	while i > 0:
		k = int(s[j]) * pow(10, i)
		if k == '0':
			continue
		else:
			t.append(str(k))
		i -= 1
		j += 1
	t.append(n1)
	for i in range(len(t)):
		if t[i] == '0':
			continue
		else:
			l.append(t[i])
	print(len(l))
	print(' '.join(l))
	z -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	l = len(str(n))
	li = list(str(n))
	co = li.count('0')
	print(l - co)
	for i in li:
		l = l - 1
		if i == '0':
			continue
		else:
			print(str(i) + l * '0', end=' ')


t = int(input())
for g in range(t):
	n = int(input())
	arr = []
	i = 1
	count = 0
	while n != 0:
		rem = n % 10
		if rem != 0:
			f = rem * i
			arr.append(f)
			count += 1
		i *= 10
		n //= 10
	print(count)
	for j in range(count):
		print(arr[j])


tests = int(input())
for _ in range(tests):
	n = input()
	temp = []
	for i in range(len(n)):
		if n[i] != '0':
			num = n[i:]
			if int(num) % 10 ** len(num) != 0:
				temp.append(int(num[0]) * 10 ** (len(num) - 1))
			else:
				temp.append(num)
				break
	print(len(temp))
	print(*temp)


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


t = int(input())
for i in range(t):
	a = input()
	l = len(a)
	x = []
	for j in range(l):
		if a[j] != '0':
			x.append(int(a[j]) * 10 ** (l - j - 1))
	print(len(x))
	print(' '.join(map(str, x)))


for _ in range(int(input())):
	n = input()
	a = list(n)
	if len(a) == 1 or a.count('0') == len(a) - 1:
		print(1)
		print(''.join(a))
	else:
		print(len(a) - a.count('0'))
		for i in range(len(a)):
			if a[i] != '0':
				print(int(a[i]) * 10 ** (len(a) - i - 1), end=' ')
	print()


def isround(b):
	if b < 10:
		return True
	elif list(str(b)).count(0) == len(str(b)) - 1:
		return True
	else:
		return False
n = int(input())
l = []
for _ in range(n):
	c = []
	a = int(input())
	if isround(a):
		c.append(a)
	else:
		b = list(str(a))
		b.reverse()
		for i in range(len(b)):
			if b[i] != '0':
				b[i] = int(b[i]) * 10 ** i
				c.append(b[i])
	l.append(c)
for i in l:
	print(len(i))
	for j in i:
		print(j, end=' ')


t = int(input())
for i in range(t):
	n = input()
	n = n[::-1]
	res = 0
	val = []
	k = 0
	for j in range(len(n)):
		if not n[j] == '0':
			res += 1
			val.insert(k, int(n[j]) * 10 ** j)
			k += 1
	print(res)
	for k in range(len(val)):
		print(val[k], end=' ')


def remiender(x):
	lst = list()
	if x == 10000:
		lst.append(str(10000))
	else:
		if x > 1000:
			lst.append(str(1000 * (x // 1000)))
			x = x % 1000
		if x > 100:
			lst.append(str(100 * (x // 100)))
			x = x % 100
		if x > 10:
			lst.append(str(10 * (x // 10)))
			x = x % 10
		if x > 0 and x <= 10:
			lst.append(str(x))
	return [len(lst), ' '.join(lst)]
n = int(input())
lst = list()
for i in range(n):
	lst.append(int(input()))
for i in lst:
	print(remiender(i)[0])
	print(remiender(i)[1])


import sys
import math

def is_round(a):
	if 1 <= a <= 9:
		return True
	else:
		s = list((int(i) for i in str(a)[1:]))
		if sum(s) == 0:
			return True
		else:
			return False
t = int(sys.stdin.readline().split()[0])
numbers = []
for line in sys.stdin:
	for word in line.split():
		numbers.append(int(word))
for number in numbers:
	if is_round(number):
		print(1)
		print(number)
	else:
		power = int(math.log10(number))
		i = power
		k = 0
		s = ''
		while i >= 0:
			digit = int(str(number)[power - i])
			if digit == 0:
				i -= 1
				continue
			else:
				t = pow(10, i) * digit
				s += str(t) + ' '
			k += 1
			i -= 1
		print(k)
		print(s)


for i in range(int(input())):
	(c, n) = (0, int(input()))
	(l, m) = ([], 1)
	s = str(n)
	for i in s[::-1]:
		if i != '0':
			l.append(m * int(i))
		m *= 10
	print(len(l))
	print(*l)


for i in range(int(input())):
	s1 = input()
	n = int(s1)
	l1 = []
	for j in range(len(s1)):
		if int(n % 10) != 0:
			l1.append(int(n % 10) * pow(10, j))
		n /= 10
	print(len(l1))
	for j in range(len(l1)):
		print(l1[j], end=' ')
	print('\n')


import math
for _ in range(int(input())):
	n = input()
	res = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		res.append(int(n[i]) * 10 ** (len(n) - i - 1))
	print(len(res))
	print(*res)


t = int(input())
while t > 0:
	l = []
	l2 = []
	n = input()
	n = int(n)
	a = 10
	while True:
		x = n % a
		l.append(x)
		if n / a == 0:
			break
		n = n - x
		a = 10 * a
	for i in range(len(l)):
		if l[i] != 0:
			l2.append(l[i])
	print(len(l2))
	print(*l2)
	t = t - 1


import sys
t = int(sys.stdin.readline())
while t:
	num = str(sys.stdin.readline()).replace('\n', '')
	nums = []
	num_size = len(num) - 1
	for (index, n) in enumerate(num):
		if n != '0':
			res = n
			zero = '0' * (num_size - index)
			nums.append(n + zero)
	print(len(nums))
	for num in nums:
		print(num, end=' ')
	print()
	t -= 1


x = int(input())
r = [input() for i in range(x)]
for l in r:
	p = []
	for i in range(len(l)):
		if l[i] != '0':
			p.append(l[i] + '0' * (len(l) - i - 1))
	print(len(p))
	print(*p)


t = int(input())
for i in range(t):
	n = int(input())
	k = 1
	a = []
	while n > 0:
		if n % 10 != 0:
			a.append(n % 10 * k)
			n = n - n % 10
		else:
			n = n // 10
			k = k * 10
	print(len(a))
	print(*a)


def sum_of_rn(num):
	lngth = len(str(num))
	zlen = 0
	res = 0
	arr = []
	while num != 0:
		if res != lngth:
			if num % 10 != 0:
				mul = 10 ** res
				arr.append(num % 10 * mul)
				zlen += 1
			res += 1
		num = num // 10
	arr.append(zlen)
	return arr
t = int(input())
for i in range(t):
	n = int(input())
	res = sum_of_rn(n)
	print(res[-1])
	print(*res[:len(res) - 1])
print()


t = int(input())
for i in range(t):
	n = int(input())
	divisors = []
	k = 10
	while n != 0:
		div = n % k
		if div != 0:
			divisors.append(div)
			n -= div
		k *= 10
	print(len(divisors))
	print(*divisors, sep=' ')


for _ in range(int(input())):
	n = input()
	if len(n) == 1:
		print(1)
		print(n)
	else:
		a = n[0]
		b = set(list(n[1:]))
		if b == {0}:
			print(1)
			print(n)
		else:
			u = 1
			s = 0
			l = []
			for x in range(len(n) - 1, -1, -1):
				if int(n[x]) != 0:
					s += 1
					p = int(n[x]) * u
					l.append(p)
				u *= 10
			print(s)
			print(' '.join((str(x) for x in l)))


import math
import string
t = int(input())
for j in range(0, t):
	b = list()
	n = input()
	l = len(n)
	n = int(n)
	if n < 10:
		print(1)
		print(n)
		continue
	while n > 9:
		p = pow(10, l - 1)
		a = n // p
		if a != 0:
			b.append(a * p)
		n = n % p
		if n < 10 and n != 0:
			b.append(n)
		l = l - 1
	print(len(b))
	print(*b)


t = int(input())
res = []
for i in range(t):
	num = input()
	if len(num) == 1:
		res.append(num)
	else:
		ap = []
		for j in range(len(num)):
			f = int(num[j])
			f = f * 10 ** (len(num) - 1 - j)
			if f != 0:
				ap.append(str(f))
		res.append(ap)
for i in res:
	print(len(i))
	print(' '.join(i))


n = int(input())
a = []
for i in range(n):
	elem = int(input())
	a.append(elem)
for elem in a:
	b = []
	while elem > 0:
		a = elem % 10
		b.append(a)
		elem = elem // 10
	b.reverse()
	d = len(b)
	count = 0
	for i in range(d):
		if b[i] != 0:
			count += 1
	print(count)
	for i in range(d):
		if b[i] != 0:
			print(b[i] * 10 ** (d - i - 1), end=' ')
	print()


t = int(input())
for j in range(t):
	n = int(input())
	c = 0
	c1 = 0
	s = ''
	while n > 0:
		rem = n % 10
		if rem != 0:
			s += str(rem * 10 ** c) + ' '
			c1 += 1
		c += 1
		n = n // 10
	print(c1)
	print(s)


t = int(input())
for i in range(t):
	n = int(input())
	c = 0
	k = []
	while n > 0:
		rem = n % 10
		n = int(n / 10)
		k.append(rem)
	for i in k:
		if i != 0:
			c += 1
	print(c)
	for i in range(len(k) - 1, -1, -1):
		k[i] = k[i] * 10 ** i
	for i in range(len(k) - 1, -1, -1):
		if k[i] != 0:
			print(k[i], end=' ')
	print()


t = int(input())
while t:
	ans = ''
	le = 0
	n = input()
	if len(n) == 1:
		print('1')
		print(n)
	else:
		for i in range(len(n)):
			if n[i] != '0':
				le += 1
				a = n[i] + (len(n) - (i + 1)) * '0'
				ans += a + ' '
		print(le)
		print(ans)
	t -= 1


test_cases = int(input())
for _ in range(test_cases):
	number = int(input())
	result = list()
	count = 1
	while number:
		last_digit = number % 10
		number //= 10
		if last_digit:
			result.append(str(last_digit * count))
		count *= 10
	print(len(result))
	print(' '.join(result))


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


a = (input() for i in range(int(input())))
for i in a:
	(k, b, c) = (0, [], 10)
	while int(i) != 0:
		if int(i) % c != 0:
			b += [int(i) % c]
			i = str(int(i) - int(i) % c)
			k += 1
		c *= 10
	print(k)
	print(*b)


num_cases = int(input())
for _ in range(num_cases):
	num = input()
	arr = [int(num1) for num1 in num]
	counter = 0
	arr.reverse()
	print(len(arr) - arr.count(0))
	for num1 in arr:
		if num1 != 0:
			print(num1, end='')
			for __ in range(counter):
				print('0', end='')
			print(' ', end='')
		counter += 1
	print()


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	res = []
	n = int(sys.stdin.readline())
	z = str(n)
	length = len(z)
	for r in z:
		if r == '0':
			pass
		else:
			k = r + '0' * (length - 1)
			res.append(k)
		length -= 1
	print(len(res))
	print(*res)


t = int(input())
for _ in range(t):
	n = int(input())
	l = [int(i) for i in str(n)]
	l = list(reversed(l))
	res = []
	if n > 0 and n < 11:
		print('1')
		print(n)
	else:
		res.append(l[0])
		for i in range(1, len(l)):
			res.append(l[i] * pow(10, i))
		res = list(filter(0 .__ne__, res))
		print(len(res))
		print(' '.join(map(str, res)))


t = int(input())
while t > 0:
	s = ''
	t = t - 1
	p = 1
	c = 0
	r = 0
	n = int(input())
	k = n
	while n > 0:
		n = n // 10
		c = c + 1
	while c > 1:
		p = p * 10
		c = c - 1
	while k > 0:
		m = k // p
		if m * p != 0:
			s = s + str(m * p) + ' '
			r = r + 1
		k = k % p
		p = p // 10
	print(r)
	print(s)


t = int(input())
for i in range(t):
	l = list(input())
	ans = []
	for (i, item) in enumerate(l):
		if item != '0':
			ans.append(item + '0' * (len(l) - i - 1))
	print(len(ans))
	print(' '.join(ans))


n = int(input())
for i in range(n):
	a = str(input())
	k = 0
	for i in a:
		if i != '0':
			k = k + 1
	print(k)
	m = a[::-1]
	for i in range(0, len(m)):
		l = int(m[i]) * 10 ** int(i)
		if l != 0:
			print(l, end=' ')


n = int(input())
while n > 0:
	x = int(input())
	a = []
	z = 1
	while x > 0:
		d = x % 10
		if d > 0:
			a.append(d * z)
		z *= 10
		x //= 10
	print(len(a))
	print(*a)
	n -= 1


t = int(input())
for __ in range(t):
	numb = input()
	ergL = []
	while numb != '':
		erg = numb[0]
		x = numb
		numb = numb[1:len(numb) + 1]
		for i in range(len(numb)):
			if numb[i] != '0':
				ergL.append(erg + '0' * (len(numb) + 1 - len(erg)))
				numb = numb[i:len(numb) + 1]
				break
			else:
				erg += '0'
		if erg == x:
			break
	ergL.append(erg)
	erg = ''
	print(str(len(ergL)))
	for i in ergL:
		erg += i
		erg += ' '
	print(erg)


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


t = int(input())
while t > 0:
	n = int(input())
	l = []
	d = 0
	x = 1
	if n < 10:
		print('1')
		print(n)
		t -= 1
		continue
	while n > 0:
		d = n % 10
		if d != 0:
			l.append(d * x)
		x = x * 10
		n = n // 10
	print(len(l))
	for i in l:
		print(i, end=' ')
	print('')
	t -= 1


for _ in range(int(input())):
	s = input()
	n = len(s) - 1
	(j, l) = (0, [])
	for i in s:
		if i != '0':
			l.append(i + '0' * (n - j))
		j += 1
	print(len(l), ' '.join(l), sep='\n')


t = int(input())
for _ in range(t):
	n = input()
	q = len(n)
	out = [n[i] + str('0' * (q - i - 1)) for i in reversed(range(1, q)) if n[i] != '0']
	out.append(n[0] + str('0' * (q - 1)))
	print(len(out))
	print(*out)


for x in range(int(input())):
	q = 0
	p = []
	k = input().strip()
	for y in range(len(k) - 1, -1, -1):
		z = int(k[y]) * 10 ** q
		if z != 0:
			p.insert(0, z)
		q += 1
	print(len(p))
	print(*p)


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)


n = int(input())
t = []
for i in range(n):
	t.append(int(input()))
for i in range(n):
	c = 0
	o = []
	d = 10
	while t[i] > 0:
		f = t[i] % d
		if f:
			o.append(f)
			c += 1
		t[i] -= f
		d *= 10
	o.append(c)
	print(o[-1])
	print(' '.join((str(o[x]) for x in range(len(o) - 1))))


from statistics import median
from fractions import gcd
from itertools import combinations
from collections import deque
from collections import defaultdict
import bisect
import sys
sys.setrecursionlimit(10000000)
mod = 10 ** 9 + 7

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

def main():
	n = int(input())
	for i in range(n):
		a = input()
		lena = len(a)
		zero = a.count('0')
		print(lena - zero)
		for j in range(lena):
			if a[lena - j - 1] != '0':
				print(int(a[lena - j - 1]) * 10 ** j, end=' ')
		print('')
main()


def main():
	t = int(input())
	for i in range(t):
		k = input()
		k = list(k)
		counter = 0
		res = []
		for j in range(len(k)):
			if k[j] != '0':
				counter += 1
				res.append(k[j] + '0' * (len(k) - j - 1))
		print(counter)
		for j in res:
			print(j, end=' ')
		print()
main()


for i in range(int(input())):
	numero = int(input())
	numero = str(numero)
	aux = len(numero)
	cont = 0
	seila = ''
	result = ''
	for j in range(len(numero)):
		p = numero[j]
		if p != '0':
			seila = p + '0' * (aux - 1)
			result += seila + ' '
			cont += 1
		aux -= 1
	print(cont)
	print(result)


t = int(input())
l = []
for i in range(t):
	s = ''
	n = input()
	sum = 0
	for i in n:
		sum += int(i)
	if sum == int(n[0]):
		l.append(1)
		l.append(n)
	else:
		j = len(n) - 1
		for i in n:
			if n.index(i) != len(n) - 1:
				if i != '0':
					num = int(i) * 10 ** j
					s += str(num) + ' '
				else:
					s += ''
				j -= 1
			else:
				if i != '0':
					num = int(i) * 10 ** j
					s += str(num)
				else:
					s += ''
				j -= 1
		length = len(s.split())
		l.append(length)
		l.append(s)
for i in l:
	print(i)


t = int(input())
for i in range(t):
	n = int(input())
	sum = 0
	cheng = 1
	output = ''
	while n:
		num = n % 10
		n = n // 10
		if num:
			output += str(num * cheng) + ' '
			cheng *= 10
			sum += 1
		else:
			cheng *= 10
	print(sum)
	print(output)


def function(n):
	s = [int(x) for x in list(str(n))[::-1]]
	ans = []
	for i in range(len(s)):
		if s[i] != 0:
			ans.append(s[i] * 10 ** i)
	return ans
t = int(input())
while t > 0:
	n = int(input())
	arr = function(n)
	print(len(arr))
	for item in arr:
		print(item, end=' ')
	print()
	t -= 1


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	length = len(str(n))
	count = 0
	tempArr = []
	for i in range(4, 0, -1):
		temp = n // 10 ** (i - 1)
		temp2 = temp * 10 ** (i - 1)
		if temp2 != 0:
			count += 1
			tempArr.append(temp2)
		n -= temp2
	print(count)
	for j in range(len(tempArr)):
		if j == len(tempArr) - 1:
			print(tempArr[j])
		else:
			print(tempArr[j], end=' ')


for _ in range(int(input())):
	n = int(input())
	strn = str(n)
	if len(strn) - strn.count('0') == 1:
		print(1)
		print(n)
	else:
		ans = []
		while n > 0:
			a = n % 10 ** (len(str(n)) - 1)
			ans.append(n - a)
			n = a
		print(len(ans))
		print(*ans)


for _ in range(int(input())):
	n = input()
	len_n = len(n)
	ans = []
	count = 0
	for i in range(len(n)):
		if n[i] == '0':
			len_n -= 1
			continue
		else:
			str = n[i] + '0' * (len_n - 1)
			ans.append(str)
			count += 1
			len_n -= 1
	print(count)
	print(*ans)


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


def process(x):
	x = str(x)
	l = list()
	for i in range(len(x)):
		if x[i] == '0':
			continue
		else:
			l.append(x[i] + '0' * (len(x) - i - 1))
	print(len(l))
	for item in l:
		print(item, end=' ')
	print('')

def main():
	n = int(input())
	l = list()
	for i in range(n):
		l.append(input())
	for i in range(n):
		process(str(l[i]))
main()


t = int(input())
for _ in range(t):
	n = int(input())
	ans = []
	mul = 1
	while n:
		(n, r) = divmod(n, 10)
		if r:
			ans.append(r * mul)
		mul *= 10
	print(len(ans))
	print(*ans)


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

	def solve(a):
		b = [x for x in str(a)]
		n = 10 ** (len(b) - 1)
		l = []
		for i in b:
			l.append(int(i) * n)
			if int(i) * n == 0:
				l.pop()
			n //= 10
		print(len(l))
		for _ in l:
			print(_, end=' ')
	solve(a)


n = int(input())
for i in range(n):
	k = input()
	li = []
	for i in k:
		li.append(i)
	c = li.count('0')
	print(len(li) - c)
	for j in range(len(li)):
		if li[j] != '0':
			print(li[j], end='')
			for i in range(j + 1, len(li)):
				print('0', end='')
			print(end=' ')


import sys
input = sys.stdin.readline

def solve(n):
	mult = 1
	res = []
	while n > 0:
		if n % 10 > 0:
			res.append(str(n % 10 * mult))
		n //= 10
		mult *= 10
	print(len(res))
	print(' '.join(res))
t = int(input())
for _ in range(t):
	n = int(input())
	solve(n)


import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy

def main():
	N = int(input())
	for _ in range(N):
		res = []
		n = input()
		n = n[::-1]
		dd = 1
		for i in range(len(n)):
			if n[i] == '0':
				continue
			res.append(str(int(n[i]) * 10 ** i))
		print(len(res))
		print(' '.join(res))
main()


t = int(input())
for i in range(t):
	n = int(input())
	c = 0
	l = []
	k = 0
	while n > 0:
		r = n % 10
		if r > 0:
			l.append(r * 10 ** k)
			c += 1
		k += 1
		n = n // 10
	print(c)
	for i in l:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	x = []
	y = []
	for i in range(1, int(len(str(n)) + 1)):
		if int(n % 10 ** i) != 0:
			if x.count(int(n % 10 ** i)) == 0:
				x.append(int(n % 10 ** i))
	for i in range(int(len(x) - 1), 0, -1):
		c = x[i] - x[i - 1]
		y.append(c)
	y.append(x[0])
	print(len(y))
	print(*y)


t = int(input())
for i in range(t):
	n = int(input())
	c = 0
	p = 1
	s = ''
	while n > 0:
		if int(n % 10) > 0:
			d = int(n % 10) * p
			c = c + 1
			s = s + str(d) + ' '
		p = p * 10
		n = n // 10
	print(c)
	print(s)


t = int(input())
for q in range(t):
	n = int(input())
	n = str(n)
	l = len(n)
	c = 0
	for ch in n:
		if ch != '0':
			c += 1
	if c != 0:
		print(c)
	for i in range(l):
		if n[i] == '0':
			continue
		else:
			print(int(n[i]) * 10 ** (l - i - 1), end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	s = len(str(n))
	m = n
	k = 0
	arr = []
	while m != 0:
		x = m % 10
		m = m // 10
		t = x * 10 ** k
		arr.append(t)
		k += 1
	i = 0
	while i < len(arr):
		if arr[i] == 0:
			arr.pop(i)
			i -= 1
		i += 1
	print(len(arr))
	print(*arr)


for _ in range(int(input())):
	x = input().strip()
	if len(x) == 1:
		print(1)
		print(x)
	elif all(list(x[1:])) == '0':
		print('1')
		print(x)
	else:
		c = 0
		res = []
		for i in range(len(x)):
			if x[i] != '0':
				c += 1
				res.append(int(x[i]) * pow(10, len(x) - i - 1))
		print(c)
		print(*res)


for _ in range(int(input())):
	n = int(input())
	if n < 10:
		print(1)
		print(n)
	else:
		cnt = 0
		i = 0
		l = []
		while n > 0:
			val = n % 10
			tmp = 10 ** i * val
			if tmp != 0:
				l.append(tmp)
				cnt += 1
			i += 1
			n //= 10
		print(cnt)
		for i in l:
			print(i, end=' ')
		print()


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def lsi():
	x = list(stdin.readline())
	x.pop()
	return x

def si():
	return stdin.readline().rstrip()
res = ['YES', 'NO']
test_case = ii()
while test_case:
	test_case -= 1
	n = ii()
	x = 1
	a = []
	while n:
		d = n % 10
		if d:
			a.append(d * x)
		x *= 10
		n //= 10
	print(len(a))
	print(*a)


n = int(input())
while n:
	p = input()
	count = p.count('0')
	tam = len(p)
	tam_aux = tam - 1
	print('{}'.format(tam - count))
	for i in range(tam):
		if p[i] != '0':
			print('{}{} '.format(p[i], tam_aux * '0'), end='')
		tam_aux -= 1
	print('')
	n -= 1


def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
entries = inp()
for i in range(entries):
	num = inp()
	l = []
	tmp = num
	counter = 1
	while tmp != 0:
		if tmp % 10 != 0:
			l.append(counter * (tmp % 10))
		tmp //= 10
		counter *= 10
	res = ''
	print(len(l))
	for x in l:
		res += str(x) + ' '
	print(res)


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


t = int(input())
for _ in range(t):
	n = input()
	a = len(n)
	if a == 1:
		print(1)
		print(n)
	else:
		p = list(n)
		z = []
		for i in range(a - 1, 0, -1):
			if n[i] != '0':
				z.append(''.join(p[i:]))
				p[i] = '0'
		z.append(''.join(p))
		print(len(z))
		for i in z:
			print(i, sep=' ', end=' ')
		print(' ')


import sys

def read_int():
	return int(sys.stdin.readline())

def read_ints():
	return list(map(int, sys.stdin.readline().split()))
t = read_int()
input1 = [5009, 7, 9876, 10000, 10]
for j in range(t):
	value = read_int()
	s = list(str(value))
	l = len(s)
	lst = []
	for (ind, c) in enumerate(s):
		if c is not '0':
			chislo = [c]
			chislo.extend(['0'] * (l - ind - 1))
			lst.append(int(''.join(chislo)))
	print(len(lst))
	for i in lst:
		print(i, end=' ')


cases = int(input())
compteur = 0
liste2 = []
for loop in range(cases):
	ligne = input()
	liste = [int(x) for x in ligne]
	roger = len(liste) - 1
	for loop in range(len(liste)):
		if liste[loop] != 0:
			liste[loop] = liste[loop] * 10 ** roger
		roger -= 1
	for loop in range(len(liste)):
		if liste[loop] != 0:
			liste2.append(str(liste[loop]))
	print(len(liste2))
	print(' '.join(liste2))
	liste2 = []


def printComposit(num):
	result = []
	strNum = str(num)[::-1]
	mult = 1
	for x in strNum:
		if int(x) != 0:
			result.append(int(x) * mult)
		mult *= 10
	print(len(result))
	for r in result:
		print(r, end=' ')
	print()
data = []
t = int(input())
for i in range(t):
	data.append(int(input()))
for d in data:
	printComposit(d)


def summands(n):
	if n[0] == 0 and n.count(n[0]) == len(n):
		print(1)
		print(n)
		return
	elif len(n) == 1:
		print(1)
		print(n)
		return
	l = []
	for i in range(0, len(n)):
		if n[i] != '0':
			temp = n[i] + '0' * (len(n) - i - 1)
			l.append(temp)
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()
t = int(input())
for i in range(t):
	summands(input())


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	out = []
	n = str(n)
	for i in range(len(n)):
		if n[i] != '0':
			out.append(n[i] + '0' * (len(n) - i - 1))
	print(len(out))
	print(*out)


for o in range(int(input())):
	n = int(input())
	l = []
	while n != 0:
		s = len(str(n))
		if s == 1:
			d = 1
		else:
			d = int('1' + '0' * (s - 1))
		l.append(str(n - n % d))
		n = n % d
	print(len(l))
	l = l[::-1]
	for i in range(0, len(l)):
		print(l[i], end=' ')
	print()


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict, Counter
import math

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	s = str(n)
	li = []
	c = len(s) - 1
	for st in s:
		if st != '0':
			num = int(st) * 10 ** c
			li.append(num)
		c -= 1
	print(len(li))
	print(*li)


def round(n):
	l = []
	p = 0
	while n != 0:
		r = n % 10
		if r != 0:
			l.append(r * 10 ** p)
		p += 1
		n //= 10
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()
T = int(input())
for i in range(T):
	n = int(input())
	round(n)


testcases = int(input())
for test in range(testcases):
	n = input()
	k = 0
	k_list = []

	def check_round(num):
		num = str(num)
		if len(num) != 1:
			if len(num.rstrip('0')) == 1:
				return True
			else:
				return False
		return True
	if check_round(n):
		print(k + 1)
		print(n)
	else:
		n = int(n)
		while n != 0:
			j = len(str(n))
			calc_factor = n % 10 ** (j - 1)
			k_list.append(n - calc_factor)
			k += 1
			n = calc_factor
		print(k)
		for i in k_list:
			print(i, end=' ')
		print()


def main():
	n = int(input())
	for i in range(n):
		num = input()
		l = len(num)
		ans_num = 0
		ans_line = []
		for k in range(l):
			if num[k] == '0':
				continue
			else:
				ans_line.append(num[k].ljust(l - k, '0'))
				ans_num += 1
		print(ans_num)
		print(*ans_line)
main()


for _ in range(int(input())):
	n = list(map(int, input()))
	l = len(n)
	c = l - n.count(0)
	print(c)
	for i in range(l):
		if n[i]:
			print(n[i] * pow(10, len(n) - 1 - i), end=' ')
	else:
		print('\n')


import bisect
from math import pi
from collections import deque
from math import factorial
from math import log, ceil
from collections import defaultdict
from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *
from fractions import Fraction
mod = int(pow(10, 9) + 7)

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li1():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

def fmi():
	return map(int, stdin.readline().split())

def fli():
	return list(fmi())
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d:
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d:
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = defaultdict(list)
	for i in range(n):
		(x, y) = mi()
		d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)

def SieveOfEratosthenes(n, isPrime):
	isPrime[0] = isPrime[1] = False
	for i in range(2, n):
		isPrime[i] = True
	p = 2
	while p * p <= n:
		if isPrime[p] == True:
			i = p * p
			while i <= n:
				isPrime[i] = False
				i += p
		p += 1
	return isPrime

def dijkstra(edges, f, t):
	g = defaultdict(list)
	for (l, r, c) in edges:
		g[l].append((c, r))
	(q, seen, mins) = ([(0, f, ())], set(), {f: 0})
	while q:
		(cost, v1, path) = heappop(q)
		if v1 not in seen:
			seen.add(v1)
			path = (v1, path)
			if v1 == t:
				return (cost, path)
			for (c, v2) in g.get(v1, ()):
				if v2 in seen:
					continue
				prev = mins.get(v2, None)
				next = cost + c
				if prev is None or next < prev:
					mins[v2] = next
					heappush(q, (next, v2, path))
	return float('inf')

def binsearch(a, l, r, x):
	while l <= r:
		mid = l + (r - 1) // 2
		if a[mid]:
			return mid
		elif a[mid] > x:
			l = mid - 1
		else:
			r = mid + 1
	return -1

def readTree(n):
	adj = [set() for _ in range(n)]
	for _ in range(n - 1):
		(u, v) = map(int, input().split())
		adj[u - 1].add(v - 1)
		adj[v - 1].add(u - 1)
	return adj

def treeOrderByDepth(n, adj, root=0):
	parent = [-2] + [-1] * (n - 1)
	ordered = []
	q = deque()
	q.append(root)
	depth = [0] * n
	while q:
		c = q.popleft()
		ordered.append(c)
		for a in adj[c]:
			if parent[a] == -1:
				parent[a] = c
				depth[a] = depth[c] + 1
				q.append(a)
	return (ordered, parent, depth)
for _ in range(ii()):
	n = ii()
	s = str(n)
	l = []
	for i in range(len(s)):
		if int(s[i] + '0' * (len(s) - i - 1)) != 0:
			l.append(s[i] + '0' * (len(s) - i - 1))
	print(len(l))
	print(*l)


def solve(n):
	coeff = 1
	digits = []
	while n > 0:
		digit = n % 10
		if digit > 0:
			digits.append(digit * coeff)
		coeff *= 10
		n //= 10
	print(len(digits))
	print(*digits)

def main():
	tests = int(input())
	while tests:
		solve(int(input()))
		tests -= 1
main()


tests = int(input())
while tests:
	n = int(input())
	ans = []
	pw = 1
	while n:
		if n % 10 > 0:
			v = n % 10 * pw
			ans.append(v)
		n //= 10
		pw *= 10
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	tests -= 1


t = int(input())
count = 0
ans = []
for i in range(t):
	n = int(input())
	length = len(str(n))
	if length == 1 or n % 10 ** (length - 1) == 0:
		print('1' + '\n' + str(n))
	else:
		for i in range(length):
			if n % 10 != 0:
				ans.append(n % 10 * 10 ** count)
			count += 1
			n //= 10
		print(len(ans))
		for ele in ans:
			print(ele, end='\n')
		count = 0
		ans.clear()


n = int(input())
l = []
for i in range(n):
	i = int(input())
	l = l + [i]
ln = [1, 2, 3, 4, 5, 6, 7, 8, 9]
for j in l:
	if int(j) in ln:
		print('1', '\n' + str(j))
	else:
		n = len(str(j))
		la = []
		for k in str(j):
			if int(k) != 0:
				la.append(k + '0' * (n - 1))
			n -= 1
		print(len(la))
		for q in la:
			print(int(q), end=' ')
		print('')


t = int(input())
for _ in range(t):
	n = int(input())
	ans = []
	c = 0
	power = 0
	while n != 0:
		if n % 10 != 0:
			ans.append(10 ** power * (n % 10))
			c += 1
		n = int(n / 10)
		power += 1
	print(c)
	for i in ans:
		print(i, end=' ')
	print()


def solve():
	N = input()
	l = len(N) - 1
	res = []
	for (i, ch) in enumerate(N):
		if ch != '0':
			res.append(int(ch) * 10 ** (l - i))
	print(len(res))
	print(' '.join(map(str, res)))
for t in range(1, int(input()) + 1):
	solve()


for _ in range(int(input())):
	n = int(input())
	arr = list()
	k = 1
	while n:
		arr.append(n % 10 * k) if n % 10 else None
		k *= 10
		n //= 10
	print(len(arr))
	print(*arr)


n = int(input())
t = [int(input()) for _ in range(n)]
for titem in t:
	sum = 0
	klist = []
	for i in range(4, -1, -1):
		if titem // 10 ** i:
			sum += 1
			klist.append(titem // 10 ** i * 10 ** i)
			titem = titem % 10 ** i
	if sum > 0:
		if titem > 0:
			sum += 1
		print(sum)
	loop = 0
	for k in klist:
		if loop > 0:
			print(' ', end='')
		print(k, end='')
		loop += 1
	if titem > 0:
		print(titem)
	else:
		print('')


t = int(input())
for _ in range(t):
	inp = int(input())
	arr = []
	div = 10
	while inp > 0:
		val = inp % div
		if val != 0:
			arr.append(val)
			inp = inp - val
		div = div * 10
	print(len(arr))
	print(' '.join(map(str, arr)))


for _ in range(int(input())):
	exp_for = []
	num = [int(x) for x in input()]
	exp_for = [num[i] * 10 ** (len(num[i:]) - 1) for i in range(len(num))]
	s = [str(x) for x in exp_for if x != 0]
	print(len(s))
	print(' '.join(s))


from collections import Counter
import itertools
from functools import lru_cache
import sys
import math

def helper():
	pass

def solve():
	n = int(input())
	pos = 0
	ans = []
	while n:
		d = n % 10
		val = d * pow(10, pos)
		if val != 0:
			ans.append(val)
		n = n // 10
		pos += 1
	print(len(ans))
	print(' '.join(list(map(str, ans[::-1]))))
t = int(input())
for _ in range(t):
	solve()


import math
t = int(input())
while t > 0:
	count = 0
	n = int(input())
	x = str(n)
	print(math.floor(math.log10(n) + 1) - x.count('0'))
	while n:
		st = '0'
		rem = n % 10
		if rem != 0:
			print(str(rem) + st * count, end=' ')
		count += 1
		n = n // 10
	print()
	t -= 1


def main():
	ans = []
	n = int(input())
	ns = str(n)
	cnt = len(ns) - 1
	for i in ns:
		if i != '0':
			ans.append(int(i) * 10 ** cnt)
		cnt -= 1
	print(len(ans))
	print(*ans)
t = int(input())
for i in range(t):
	main()


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
for _ in range(inp()):
	n = inp()
	num_list = []
	res = []
	count = 0
	while n > 0:
		num_list.append(n % 10)
		n //= 10
	for i in range(len(num_list)):
		if num_list[i] != 0:
			res.append(num_list[i] * 10 ** i)
	print(len(res))
	print(' '.join(map(str, res)))


def result(n):
	ls = []
	rev = 1
	while n != 0:
		x = n % 10
		tp = rev * x
		if tp != 0:
			ls.append(tp)
		rev *= 10
		n //= 10
	print(len(ls))
	print(*ls)
t = int(input())
for _ in range(t):
	n = int(input())
	result(n)


t = int(input())
for _ in range(t):
	number = input()
	n = len(number)
	count = 0
	numbers = []
	for i in range(n):
		if number[i] != '0':
			count += 1
			numbers.append(number[i] + '0' * (n - i - 1))
	print(count)
	print(' '.join(numbers))


t = int(input())
for i in range(0, t):
	n = int(input())
	pow = 1
	ans = []
	count = 0
	while n != 0:
		rem = n % 10
		if rem != 0:
			ans.append(pow * rem)
			count += 1
		pow *= 10
		n = int(n / 10)
	print(count)
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	x1 = n // 10000
	n = n - x1 * 10000
	x1 = x1 * 10000
	x2 = n // 1000
	n = n - x2 * 1000
	x2 = x2 * 1000
	x3 = n // 100
	n = n - x3 * 100
	x3 = x3 * 100
	x4 = n // 10
	n = n - x4 * 10
	x4 = x4 * 10
	x5 = n // 1
	x = [x1, x2, x3, x4, x5]
	y = []
	k = 0
	for i in range(0, len(x)):
		if x[i] != 0:
			k += 1
			y.append(x[i])
	print(k)
	print(*y)


t = int(input())
while t > 0:
	n = int(input())
	lst = []
	mul = 1
	while n > 0:
		rem = n % 10
		if rem != 0:
			lst.append(rem * mul)
		n = n // 10
		mul = mul * 10
	print(len(lst))
	for ele in lst:
		print(ele, end=' ')
	print()
	t -= 1


import sys, random
from bisect import bisect_left, bisect_right
input = sys.stdin.readline

def main():
	inf = 10 ** 20
	t = int(input())
	for _ in range(1, t + 1):
		n = input().strip()
		n = list(n[::-1])
		ans = []
		for i in range(len(n)):
			if n[i] != '0':
				ans.append(n[i] + '0' * i)
		print(len(ans))
		print(' '.join(ans))
main()


t = int(input())
for i in range(t):
	n = int(input())
	c = 0
	d = 0
	L = []
	while n > 0:
		if n % 10 != 0:
			L = L + [n % 10 * 10 ** c]
			d = d + 1
		n = n // 10
		c = c + 1
	print(d)
	for j in L:
		print(j, end=' ')
	print('')


t = int(input())
for i in range(t):
	n = int(input())
	s = 0
	li = []
	c = 0
	while n > 0:
		rem = n % 10
		if rem != 0:
			if s == 0:
				li.append(rem)
				c += 1
			else:
				for i in range(s):
					rem *= 10
				if rem != 0:
					li.append(rem)
				c += 1
		n = n // 10
		s += 1
	print(c)
	k = [print(i, end=' ') for i in li]
	print()


n = int(input())
array = []
for i in range(n):
	array.append(int(input()))
for i in range(len(array)):
	if array[i] % 10 == array[i]:
		print(1)
		print(array[i])
		continue
	temp = array[i]
	count = 0
	x = 1
	answer = []
	while temp:
		if temp % 10 != 0:
			count += 1
		if temp % 10 != 0:
			answer.append(temp % 10 * x)
		temp = int(temp / 10)
		x = x * 10
	print(count)
	print(*answer)


for _ in range(int(input())):
	n = input()
	lst = []
	l = len(n)
	i = 0
	while i < l:
		s = n[i]
		if s != '0':
			stri = '0' * (l - i - 1)
			lst.append(s + stri)
		i += 1
	print(len(lst))
	print(*lst)


from sys import stdin
import collections

def solve(tc):
	num = stdin.readline().strip()
	n = len(num)
	splitted = []
	for i in range(n):
		if num[i] != '0':
			splitted.append(''.join([num[i], str('0' * (n - 1 - i))]))
	print(len(splitted))
	for piece in splitted:
		print(piece, end=' ')
	print()
LOCAL_TEST = not __debug__
if LOCAL_TEST:
	infile = __file__.split('.')[0] + '-test.in'
	stdin = open(infile, 'r')
tcs = int(stdin.readline().strip())
tc = 1
while tc <= tcs:
	solve(tc)
	tc += 1


import sys
import os
import time
import collections
from collections import Counter, deque
import itertools
import math
import timeit
import random
import string

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def flin(d, x, default=-1):
	left = right = -1
	for i in range(len(d)):
		if d[i] == x:
			if left == -1:
				left = i
			right = i
	if left == -1:
		return (default, default)
	else:
		return (left, right)

def ceil(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

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

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)
for _ in range(ii()):
	s = input()
	k = len(s)
	res = []
	for i in range(k):
		if s[i] == '0':
			continue
		res.append(s[i] + '0' * (k - i - 1))
	print(len(res))
	prr(res, ' ')


import math

def BuubleSort(n):
	s = str(n)
	le = len(s)
	l = []
	for i in range(le - 1, -1, -1):
		if s[i] != '0':
			l.append(int(s[i]) * 10 ** (le - i - 1))
	return (len(l), l)

def main():
	n = int(input())
	for _ in range(n):
		a = int(input())
		(ans1, l) = BuubleSort(a)
		print(ans1)
		print(*l)
main()


for _ in range(int(input())):
	n = input()
	count = 0
	List = []
	for (i, x) in enumerate(n[-1::-1]):
		if x != '0':
			count += 1
			List.append(x + '0' * i)
	print(count)
	for x in List:
		print(x, end=' ')
	print()


t = int(input())
while t > 0:
	arr = [0] * 5
	n = int(input())
	power = 0
	count = 0
	while n > 0:
		digit = n % 10
		if digit != 0:
			count += 1
		arr[power] = digit
		power += 1
		n //= 10
	print(count)
	while power > 0:
		power -= 1
		if arr[power] > 0:
			print(arr[power] * 10 ** power, end=' ')
	print()
	t -= 1


for _ in range(int(input())):
	l = [int(x) for x in input()]
	if len(l) == 1:
		print('1')
		print(l[0])
	else:
		k = 0
		m = []
		l.reverse()
		for i in range(len(l)):
			if l[i] != 0:
				k += 1
				m.append(l[i] * 10 ** i)
		print(k)
		for values in m:
			print(values, end=' ')
		print('')


for _ in range(int(input())):
	A = {int(a) * 10 ** i for (i, a) in enumerate(reversed(input())) if a != '0'}
	print(len(A))
	print(*A)


for _ in range(int(input())):
	k = input()
	ans = ''
	c = 0
	for i in range(len(k)):
		if k[i] != '0':
			ans += str(int(k[i]) * 10 ** (len(k) - i - 1)) + ' '
			c += 1
	print(c)
	print(ans)


t = int(input())
while t > 0:
	t -= 1
	n = input()
	l = len(n)
	ans = []
	for i in range(l):
		x = int(n[i]) * pow(10, l - i - 1)
		if x > 0:
			ans.append(x)
	print(len(ans))
	print(*ans)


for _ in range(int(input())):
	x = int(input())
	cnt = 0
	i = 1
	a = []
	while x > 0:
		r = x % 10
		if r == 0:
			i += 1
			x = x // 10
			continue
		a.append(r * 10 ** (i - 1))
		i += 1
		x = x // 10
	print(len(a))
	for i in a:
		print(i, end=' ')
	print()


p = int(input())
for i in range(p):
	n = int(input())
	count = 0
	count1 = 0
	rev = 0
	while n > 0:
		a = n % 10
		if a != 0:
			count += 1
		rev = rev * 10 + a
		n = n // 10
		count1 += 1
	print(count)
	while rev > 0:
		k = rev % 10
		if k != 0:
			print(k * pow(10, count1 - 1), end=' ')
		rev = rev // 10
		count1 -= 1
	print(' ')


n = int(input())
number = []
for i in range(n):
	number.append(int(input()))
for num in number:
	rounded = []
	count = 0
	for i in range(len(str(num))):
		x = str(num)
		if x[i] != '0':
			count += 1
			rounded.append(int(x[i]) * 10 ** (len(x) - i - 1))
	print(count)
	for i in range(len(rounded)):
		if i != len(rounded) - 1:
			print(rounded[i], end=' ')
		else:
			print(rounded[i])


t = int(input())
while t != 0:
	x = input()
	l = len(x)
	l -= 1
	f = []
	c = int(0)
	for i in x:
		if i == '0':
			l -= 1
		else:
			f.append(i)
			f[c] += str('0') * l
			l -= 1
			c += 1
	t -= 1
	print(len(f))
	print(*f)


def solve():
	n = input()
	l = len(n)
	print(l - n.count('0'))
	for i in range(l):
		if n[i] == '0':
			continue
		else:
			print(n[i] + '0' * (l - i - 1), end=' ')
	print()
for __ in range(int(input())):
	solve()


from collections import deque
t = int(input())
for _ in range(t):
	n = int(input())
	mul = 1
	a = deque()
	while n > 0:
		if n % 10 != 0:
			a.appendleft(str(n % 10 * mul))
		mul *= 10
		n //= 10
	print(len(a))
	print(' '.join(a))


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def main():
	for tin in range(int(input())):
		n = str(input())
		a = []
		for _ in range(len(n)):
			if n[_] != 0:
				if int(n[_] + '0' * (len(n) - _ - 1)) != 0:
					a.append(n[_] + '0' * (len(n) - _ - 1))
		print(len(a))
		for _ in range(len(a) - 1):
			print(a[_], end=' ')
		print(a[-1])
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from sys import stdin

def main():
	readline = stdin.readline
	t = int(readline())
	res = []
	for i in range(t):
		n = readline().strip()
		li = []
		for i in range(len(n)):
			if n[i] == '0':
				pass
			else:
				s = n[i] + '0' * (len(n) - i - 1)
				li.append(s)
		res.append(li)
	for i in range(t):
		print(len(res[i]))
		print(*res[i])
main()


for _ in range(int(input())):
	s = str(input())
	lst = []
	for i in range(len(s)):
		if int(s[i]) != 0:
			lst.append(int(s[i]) * 10 ** (len(s) - i - 1))
	print(len(lst))
	print(*lst)


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


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


for i in range(int(input())):
	n = input()
	nums = []
	for j in range(len(n)):
		if int(n[j]) > 0:
			nums.append(10 ** (len(n) - 1 - j) * int(n[j]))
	print(len(nums))
	print(' '.join((str(n) for n in nums)))


import sys
input = lambda : sys.stdin.readline().rstrip()
inp = sys.stdin.buffer.readline

def I():
	return list(map(int, inp().split()))
for _ in range(I()[0]):
	n = [i for i in input()]
	n.reverse()
	ans = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		else:
			ans.append(int(n[i]) * 10 ** i)
	print(len(ans))
	print(*ans)


t = int(input())
for x in range(t):
	n = int(input())
	if 1 <= n <= 10:
		print('1')
		print(n)
	else:
		i = 1
		a = []
		while n > 0:
			rem = n % 10 ** i
			if rem == 0 and n / 10 ** i % 10 ** i + 1 == 0 or n < 10 ** i:
				a.append(n)
				break
			else:
				n -= rem
				a.append(rem)
				i += 1
		c = a.count(0)
		for i in range(c):
			a.remove(0)
		print(len(a))
		print(*a)


try:
	t = int(input())
	while t:
		n = int(input())
		s = 1
		l = []
		c = 0
		while n > 0:
			r = n % 10
			if r != 0:
				c = c + 1
				l.append(r * s)
			s = s * 10
			n = n // 10
		print(c)
		for x in range(len(l)):
			print(str(l[x]), end=' ')
		t = t - 1
		print()
except:
	pass


n = int(input())
m = []
for i in range(n):
	t = int(input())
	q = []
	w = 10
	while t > 0:
		r = t % w
		t = t - r
		w = w * 10
		if r != 0:
			q.append(r)
	m.append(q)
for i in m:
	print(len(i))
	for j in i:
		print(j, end=' ')
	print()


from fractions import Fraction
import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = 1000000007

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans
for i in range(int(input())):
	s = inp()
	a = list(s)
	b = []
	for i in range(len(a)):
		c = int(a[i]) * 10 ** (len(a) - i - 1)
		if c > 0:
			b.append(c)
	print(len(b))
	print(*b)


for _ in range(int(input())):
	number = input()
	array = []
	answer = 0
	cnt = 0
	for i in range(len(number)):
		if number[i] == '0':
			continue
		else:
			cnt += 1
			answer = int(number[i] + '0' * (len(number) - i - 1))
			array.append(answer)
	print(cnt)
	for i in array:
		print(i, end=' ')
	print()


import sys
input = sys.stdin.readline

def main():
	n = int(input())
	i = 1
	cnt = 0
	ans = []
	while n >= i:
		i *= 10
		if n % i != 0:
			cnt += 1
			ans.append(n % i)
		n //= i
		n *= i
	print(cnt)
	print(*ans)
for _ in range(int(input())):
	main()


t = int(input())
while t:
	n = int(input())
	if n >= 1 and n <= 10:
		print(1)
		print(n)
	else:
		s = str(n)
		j = 0
		s = s[::-1]
		d = []
		x = 0
		for i in range(len(s)):
			x = int(s[i]) * 10 ** j
			if x != 0:
				d.append(x)
			j = j + 1
		print(len(d))
		for i in range(len(d) - 1):
			print(d[i], end=' ')
		print(d[len(d) - 1])
	t = t - 1


n = int(input())
for i in range(n):
	num = int(input())
	num_len = len(str(num))
	ans = []
	s = num_len - 1
	for j in range(num_len):
		if int(str(num)[j]):
			ans.append(str(num)[j] + '0' * s)
		s -= 1
	print(len(ans))
	print(*ans)


n = int(input())
for test in range(n):
	ans_l = []
	m = int(input())
	c = 0
	for i in range(len(str(m))):
		if m % 10 != 0:
			ans_l.append(str(m % 10) + '0' * c)
		m //= 10
		c += 1
	print(len(ans_l))
	print(' '.join(ans_l))


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


t = int(input())
for i in range(t):
	n = int(input())
	k = 0
	numbers = []
	power = 1
	while n > 0:
		if n % 10 > 0:
			numbers.append(n % 10 * power)
			k += 1
		n = n // 10
		power *= 10
	print(k)
	for i in numbers:
		print(i)


tc = int(input())
for t in range(tc):
	n = input()
	vals = []
	ln = len(n)
	ans = 0
	for i in range(ln):
		if n[i] != '0':
			v = int(n[i] + '0' * (ln - i - 1))
			ans += 1
			vals.append(str(v))
	print(ans)
	ans_vals = ' '.join(vals)
	print(ans_vals)


for t in range(int(input())):
	n = int(input())
	l = list(str(n))
	k = l[::-1]
	g = []
	for i in range(len(k)):
		f = int(k[i]) * 10 ** i
		g.append(f)
	q = []
	for j in range(len(g)):
		if g[j] > 0:
			q.append(g[j])
	print(len(q))
	print(*q)


t = int(input())
for i in range(t):
	n = int(input())
	l = []
	for i in range(len(str(n))):
		if str(n)[i] != '0':
			l.append(int(str(n)[i]) * 10 ** (len(str(n)) - i - 1))
	print(len(l))
	print(*l, sep=' ')


class A:

	def solve(self):
		t = int(input())
		for i in range(t):
			n = list(map(int, input()))
			round_numbers = list(map(lambda x: x[0] * 10 ** x[1], filter(lambda x: x[0] > 0, zip(n, reversed(list(range(len(n))))))))
			print(len(round_numbers))
			print(' '.join(map(str, round_numbers)))
A().solve()


t = int(input())
while t:
	n = int(input())
	c = 0
	i = 0
	a = []
	while n != 0:
		r = n % 10
		if r != 0:
			c += 1
			a.append(r * 10 ** i)
		n = n // 10
		i += 1
	print(c)
	for i in range(len(a)):
		print(a[i], end=' ')
	print()
	t -= 1


t = int(input())
while t != 0:
	t -= 1
	l = []
	n = input()
	ctr = 1
	for i in n:
		if int(i) != 0:
			l.append(int(i) * 10 ** (len(n) - ctr))
		ctr += 1
	print(len(l))
	print(*l)


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


a = int(input())
for i in range(a):
	b = int(input())
	c = []
	d = 0
	while b > 0:
		b = str(b)
		c.append(int(b[0] + '0' * (len(b) - 1)))
		b = int(b) - c[-1]
		d += 1
	print(d)
	for i in range(len(c) - 1):
		print(c[i], end=' ')
	print(c[-1])


for _ in range(int(input())):
	n = input()
	print(len(n) - n.count('0'))
	for i in range(len(n)):
		if n[i] == '0':
			continue
		else:
			print(n[i] + '0' * (len(n) - i - 1), end=' ')


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


for _ in range(int(input())):
	n = int(input())
	p = 1
	rl = []
	x = []
	while n > 0:
		dig = n % 10
		r = dig * p
		rl.append(r)
		p *= 10
		n = n // 10
	for i in rl:
		if i != 0:
			x.append(i)
	print(len(x))
	print(' '.join((str(x) for x in x)))


for _ in range(int(input())):
	(x, y) = (int(input()), 1)
	ans = []
	while x > 0:
		if x % 10 == 0:
			x //= 10
			y *= 10
			continue
		ans.append(x % 10 * y)
		y *= 10
		x //= 10
	print(len(ans))
	print(*ans)


s = int(input())
for i in range(s):
	n = int(input())
	k = int('0')
	a1 = n // 10000
	b1 = n % 10000
	a2 = b1 // 1000
	b2 = b1 % 1000
	a3 = b2 // 100
	b3 = b2 % 100
	a4 = b3 // 10
	b4 = b3 % 10
	if 0 < a1:
		k = k + 1
	if a2 > 0:
		k = k + 1
	if a3 > 0:
		k = k + 1
	if a4 > 0:
		k = k + 1
	if b4 > 0:
		k = k + 1
	print(k)
	if 0 < a1:
		print(a1, '0000 ', sep='', end='')
	if a2 > 0:
		print(a2, '000 ', sep='', end='')
	if a3 > 0:
		print(a3, '00 ', sep='', end='')
	if a4 > 0:
		print(a4, '0 ', sep='', end='')
	if b4 > 0:
		print(b4, end='')
	print()


t = int(input())
for _ in range(t):
	r = []
	rr = 0
	n = int(input())
	if n >= 10000:
		r.append(n // 10000 * 10000)
		n = n % 10000
		rr += 1
	if n >= 1000:
		r.append(n // 1000 * 1000)
		n = n % 1000
		rr += 1
	if n >= 100:
		r.append(n // 100 * 100)
		n = n % 100
		rr += 1
	if n >= 10:
		r.append(n // 10 * 10)
		n = n % 10
		rr += 1
	if n < 10 and n > 0:
		r.append(n)
		rr += 1
	print(rr)
	print(' '.join(map(str, r)))


def sumOfRoundNumbers():
	n = int(input())
	for i in range(n):
		number = input()
		res = ''
		count = 0
		lengthOfNumber = len(number)
		for i in range(lengthOfNumber):
			if number[i] != '0':
				res += str(int(number[i]) * 10 ** (lengthOfNumber - 1 - i)) + ' '
				count += 1
		print(count)
		print(res)
	return
sumOfRoundNumbers()


def main():
	T = int(input())
	for _ in range(T):
		N = int(input())
		n = N
		res = []
		multiplier = 1
		while n > 0:
			nxt = n % 10
			n = n // 10
			if nxt != 0:
				res.append(nxt * multiplier)
			multiplier *= 10
		print(len(res))
		for i in res:
			print(i, end=' ')
main()


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = input()
	l = []
	for i in range(len(n) - 1):
		if int(n[i]) != 0:
			l.append(str(int(n[i]) * 10 ** (len(n) - 2 - i)))
	print(len(l))
	print(' '.join(l))


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


import math
t = int(input())
while t:
	n = int(input())
	l = []
	i = 0
	while n:
		if n % 10:
			l.append(n % 10 * int(math.pow(10, i)))
		i += 1
		n //= 10
	print(len(l))
	for x in l:
		print(x, end=' ')
	print()
	t -= 1


t = int(input())
for i in range(t):
	n = input()
	a = n.strip('0')
	if len(a) == 1 and int(n) > 0 and (a in '123456789'):
		print(1)
		print(n)
	else:
		li = []
		lii = []
		l = len(n)
		for x in range(l):
			l = l - 1
			b = int(n[x]) * 10 ** l
			if b == 0:
				li.append(b)
			else:
				lii.append(b)
		print(len(lii))
		print(' '.join(map(str, lii)))


t = int(input())
for _ in range(t):
	ans = []
	num = input()
	for i in range(len(num), 0, -1):
		ans.append(str(int(num[len(num) - i]) * 10 ** (i - 1)))
	while ans.count('0') > 0:
		ans.remove('0')
	print(len(ans))
	print(' '.join(ans))


for i in range(int(input())):
	z = []
	y = 0
	x = int(input())
	a = str(x)
	for j in range(len(a)):
		c = len(a) - j - 1
		b = x // 10 ** c
		if b != 0:
			y += 1
			b = b * 10 ** c
			z.append(b)
			x -= b
	print(y)
	for i in z:
		print(i, end=' ')
	print()


def liczby():
	t = int(input())
	for i in range(t):
		liczba = int(input())
		ile_zer = 0
		lista = []
		while liczba > 0:
			if liczba % 10 > 0:
				if ile_zer == 0:
					lista.append(liczba % 10)
				else:
					lista.append(liczba % 10 * 10 ** ile_zer)
			ile_zer += 1
			liczba = liczba // 10
		print(len(lista))
		for i in lista:
			print(i, end=' ')
		print()
liczby()


I = input
for _ in range(int(I())):
	n = list(I())
	l = list(map(int, n))
	l = l[::-1]
	ans = []
	for i in range(len(n)):
		if l[i] == 0:
			continue
		else:
			ans.append(l[i] * 10 ** i)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


def solve(n):
	a = n // 1000 * 1000
	n -= a
	b = n // 100 * 100
	n -= b
	c = n // 10 * 10
	n -= c
	d = n
	return list(filter(None, [a, b, c, d]))

def main():
	T = int(input())
	for _ in range(T):
		n = int(input())
		arr = solve(n)
		print(len(arr))
		print(' '.join(map(str, arr)))
main()


for _ in range(int(input().strip())):
	N = int(input().strip())
	s = str(N)
	flag = True
	for i in range(1, len(s)):
		if s[i] != '0':
			flag = False
			break
	if flag == False:
		L = []
		for i in range(0, len(s)):
			m = int(s[len(s) - i - 1]) * 10 ** i
			if m != 0:
				L.append(str(m))
		print(len(L))
		print(' '.join(L))
	else:
		print(str(1))
		print(str(N))


t = int(input())
for _ in range(t):
	num = input()
	l = 0
	for i in num:
		if i != '0':
			l += 1
	n = len(num)
	print(l)
	n = n - 1
	print(int(num[0]) * 10 ** n, end=' ')
	n = n - 1
	for i in num[1:]:
		j = int(i)
		k = j * 10 ** n
		if k != 0:
			print(k, end=' ')
		n -= 1
	print()


def remove_values_from_list(the_list, val):
	return [value for value in the_list if value != val]
for i in range(int(input())):
	n = input()
	c = 0
	lst = list()
	if len(n) == 1:
		print('1')
		print(n)
		continue
	else:
		for i in n:
			if int(i) == 0:
				c = c + 1
	if c == len(n) - 1:
		print('1')
		print(n)
		continue
	else:
		j = 1
		for i in n:
			lst.append(int(i) * 10 ** (len(n) - j))
			j = j + 1
	lst = remove_values_from_list(lst, 0)
	print(len(lst))
	print(*lst, sep=' ')


import math
t = int(input())
for i in range(t):
	n = input()
	len_n = len(n)
	n = int(n)
	c = 0
	nums = []
	for k in range(len_n):
		d = n % 10
		if d != 0:
			nums.append(int(d * math.pow(10, k)))
			c += 1
		n = n // 10
	print(c)
	print(*nums)


t = int(input())
for k in range(t):
	l = list(str(input()))
	ar = []
	n = len(l)
	for i in range(n):
		ar.append(int(l[i]) * 10 ** (n - i - 1))
	arr = []
	for i in ar:
		if i > 0:
			arr.append(i)
	print(len(arr))
	print(*arr)


value = int(input())
for i in range(value):
	values = input()
	values = [int(i) for i in values]
	summands = list()
	for i in range(len(values)):
		if values[i] == 0:
			continue
		else:
			summands.append(values[i] * 10 ** (len(values) - 1 - i))
	print(len(summands))
	for i in summands:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = input()
	l = len(n)
	ans = []
	x = l - 1
	for i in range(l):
		if n[i] == '0':
			m = 0
		else:
			c = n[i]
			c += x * '0'
			ans.append(c)
		x -= 1
	print(len(ans))
	print(*ans)


q = int(input())
for i in range(q):
	n = int(input())
	k = 1
	a = []
	while n > 0:
		if n % 10 != 0:
			a.append(k * (n % 10))
		n //= 10
		k *= 10
	print(len(a))
	print(' '.join(map(str, a)))


mod = [1000, 100, 10]

def solve(time):
	val = int(input())
	a = 0
	ans = []
	while val > 10:
		(d, val) = divmod(val, mod[a])
		if d != 0:
			ans.append(str(d * mod[a]))
		a += 1
	if val != 0:
		ans.append(str(val))
	print(len(ans))
	print(' '.join(ans))
nums = int(input())
for _ in range(1, nums + 1):
	solve(_)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import time, random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	t = I()
	na = [I() for _ in range(t)]
	rr = []
	for n in na:
		r = []
		k = 0
		while n > 0:
			if n % 10 > 0:
				r.append(n % 10 * 10 ** k)
			n //= 10
			k += 1
		rr.append(len(r))
		rr.extend(r)
	return JA(rr, '\n')
print(main())


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
for _ in range(INT()):
	N = INT()
	i = 0
	ans = []
	d = N
	while d > 0:
		(d, m) = divmod(d, 10)
		if m:
			ans.append(m * 10 ** i)
		i += 1
	print(len(ans))
	print(*ans)


t = int(input())
for x in range(t):
	k = list(map(int, list(input())))
	print(len(k) - k.count(0))
	for i in range(len(k)):
		if k[i] != 0:
			print(k[i] * 10 ** (len(k) - 1 - i), end=' ')
	print()


for _ in range(int(input())):
	n = input()
	a = []
	for i in n:
		a.append(int(i))
	b = []
	j = 0
	while True:
		if len(a) == 0:
			break
		b.append(a[j] * 10 ** (len(a) - 1))
		a.remove(a[j])
	b = set(b)
	if 0 in b:
		b.remove(0)
	print(len(b))
	print(*b)


t = int(input())
a = []
for i in range(t):
	i = int(input())
	a.append(i)
for i in a:
	k = 0
	b = []
	n1 = i // 1000 * 1000
	if n1 != 0:
		k += 1
	n2 = i % 1000 // 100 * 100
	if n2 != 0:
		k += 1
	n3 = i % 1000 % 100 // 10 * 10
	if n3 != 0:
		k += 1
	n4 = i % 1000 % 100 % 10
	if n4 != 0:
		k += 1
	print(k)
	c = [n1, n2, n3, n4]
	for i in c:
		if i != 0:
			b.append(i)
	print(' '.join(map(str, b)))


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


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	res = []
	i = 0
	while n > 0:
		if n % 10 > 0:
			res.append(n % 10 * 10 ** i)
		i += 1
		n = n // 10
	print(len(res))
	print(*res)


import sys
try:
	sys.stdin = open('Input.txt', 'r')
	sys.stdout = open('Output.txt', 'w')
except:
	pass
for testCases in range(int(input())):
	n = input()
	ans = []
	cnt = len(n) - 1
	for i in n:
		if i != '0':
			ans.append(i + cnt * '0')
		cnt -= 1
	print(len(ans))
	print(*ans, sep=' ')


t = int(input())
for i in range(t):
	num = [int(i) for i in input()]
	plvl = []
	for l in range(len(num)):
		if num[l] == 0:
			pass
		else:
			plvl.append(num[l] * 10 ** (len(num) - l - 1))
	print(len(plvl))
	print(' '.join((str(i) for i in plvl)))


import sys
T = int(input())
for t in range(0, T):
	n = int(input())
	l = len(str(n))
	n_sigs = list(filter(lambda x: x != '0', str(n)))
	print(f'{len(n_sigs)}')
	for x in str(n):
		if x != '0':
			sys.stdout.write(f'{int(x) * 10 ** (l - 1)} ')
		l -= 1
	print('')


for i in range(int(input())):
	n = int(input())
	a = [0] * 5
	k = 1
	a[4] = n % 10
	a[3] = n % 100 - a[4]
	a[2] = n % 1000 - a[3] - a[4]
	a[1] = n % 10000 - a[2] - a[3] - a[4]
	a[0] = n % 100000 - a[1] - a[2] - a[3] - a[4]
	while 0 in a:
		a.remove(0)
	print(len(a))
	print(*a)


for _ in range(int(input())):
	n = int(input())
	m = n
	cnt = 0
	while m > 0:
		if m % 10 != 0:
			cnt += 1
		m //= 10
	print(cnt)
	p = 1
	ans = []
	while n > 0:
		if n % 10 != 0:
			ans.append(p * (n % 10))
		n //= 10
		p *= 10
	print(' '.join((str(x) for x in ans)))


n = int(input())
for i in range(n):
	num = int(input())
	c = 1
	p = []
	while num != 0:
		z = num % 10
		p.append(z * c)
		num = num // 10
		c = c * 10
	q = [i for i in p if i != 0]
	print(len(q))
	for i in q:
		print(i, end=' ')


t = int(input())
while t:
	t = t - 1
	n = input()
	ans = []
	for w in range(len(n)):
		p = int(n[w]) * 10 ** (len(n) - w - 1)
		if p != 0:
			ans.append(p)
	print(len(ans))
	for w in ans:
		print(w, end=' ')
	print()


from collections import deque
from collections import OrderedDict
import math
import sys
import os
from io import BytesIO
import threading
import bisect
for t in range(int(input())):
	n = str(input())
	leng = len(n)
	answers = []
	zeros = []
	countZ = 0
	for i in range(leng - 1, -1, -1):
		if n[i] != '0':
			answers.append(int(n[i]))
			zeros.append(countZ)
		countZ += 1
	print(len(answers))
	for i in range(len(answers)):
		print(answers[i] * 10 ** zeros[i], end=' ')


t = int(input())
for _ in range(0, t):
	n = input()
	l = list(n)
	j = 0
	x = []
	for i in range(len(l) - 1, -1, -1):
		if int(l[i]) != 0:
			x.append(int(l[i]) * pow(10, j))
		j = j + 1
	print(len(x))
	for k in range(0, len(x)):
		print(x[k], end=' ')
	print()


for _ in range(int(input())):
	n = input()
	if len(n) == 1 or n.count('0') == len(n) - 1:
		print(1, n, sep='\n')
	else:
		n = n[::-1]
		r = []
		for i in range(len(n)):
			if n[i] != '0':
				r.append(int(n[i]) * 10 ** i)
		print(len(r))
		print(*r)


n = int(input())
l = []
s = []
for i in range(0, n):
	l.append(input())
for i in l:
	t = 1
	for j in i:
		if j != '0':
			s.append(j + '0' * (len(i) - t))
			t += 1
		else:
			t += 1
	k = len(s)
	print(k)
	print(' '.join(s))
	s = []


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


t = int(input())
for i in range(t):
	n = int(input())
	out = []
	len = 0
	k = 1
	while n // 10 != 0:
		if n % 10 != 0 and len == 0:
			out.append(n % 10)
			k = k + 1
		elif n % 10 != 0:
			out.append(n % 10 * 10 ** len)
			k = k + 1
		len = len + 1
		n = n // 10
	out.append(n % 10 * 10 ** len)
	print('\n', k)
	for x in out:
		print(x, end=' ')


for _ in range(int(input())):
	n = int(input())
	l = []
	while n > 0:
		w = n % 10
		l.append(w)
		n = n // 10
	for i in range(len(l)):
		l[i] = l[i] * 10 ** i
	l.reverse()
	p = []
	for i in range(len(l)):
		if l[i] != 0:
			p.append(l[i])
	print(len(p))
	print(*p)


t = int(input())
while t:
	t -= 1
	n = int(input())
	ans = []
	mul = 1
	while n:
		x = n % 10
		n = n // 10
		if x > 0:
			ans.append(x * mul)
		mul = mul * 10
	print(len(ans))
	print(*ans)


t = int(input())
for u in range(t):
	n = list(str(input()))
	l = []
	for i in range(len(n)):
		if n[i] != '0':
			l.append(int(n[i]) * 10 ** (len(n) - i - 1))
	print(len(l))
	for i in range(len(l) - 1):
		print(l[i], end=' ')
	print(l[len(l) - 1])


n = int(input())
for _ in range(n):
	s = input()
	l = len(s) - 1
	s = int(s)
	li = []
	rem = s
	while rem > 0:
		p = 10 ** l
		count = rem // p * p
		li.append(count)
		rem = rem % p
		l = len(str(rem)) - 1
	print(len(li))
	print(*li, sep=' ')


n = int(input())
for i in range(n):
	a = input()
	m = len(a)
	ans = 0
	an = []
	for (j, i) in enumerate(a):
		if i != '0':
			ans += 1
			an.append(str(int(i) * 10 ** (m - j - 1)))
	print(ans)
	print(' '.join(an))


t = int(input())
for _ in range(t):
	n = int(input())
	k = 1
	count = 0
	arr = []
	while n > 0:
		ans = n % 10
		n = n // 10
		if ans != 0:
			arr.append(ans * k)
			count += 1
		k *= 10
	print(count)
	print(' '.join([str(i) for i in arr]))


t = int(input())
for T in range(t):
	n = int(input())
	num = list(str(n))
	count = 0
	a = []
	for i in range(len(num)):
		if num[i] != '0':
			count += 1
			a.append(int(num[i]) * 10 ** (len(num) - 1 - i))
	print(count)
	print(*a)


n = int(input())
a = []
for i in range(n):
	a.append(int(input()))
for i in range(n):
	k = 1
	c = 0
	b = []
	while a[i] > 0:
		if a[i] % 10 != 0:
			b.append(int(a[i] % 10) * k)
			c += 1
		a[i] //= 10
		k *= 10
	print(c)
	for j in range(c):
		print(b[j], end=' ')
	print()


def summands(x):
	x1 = x
	arr1 = []
	arr2 = []
	while x1 > 0:
		rem = x1 % 10
		arr1.append(rem)
		if rem > 0:
			arr2.append(rem)
		x1 = x1 // 10
	print(len(arr2))
	for i in range(len(arr1)):
		if arr1[i] != 0:
			z = arr1[i] * 10 ** i
			if z != None:
				print(z, end=' ')
	return ''
n = int(input())
l1 = []
for i in range(n):
	l1.append(int(input()))
for i in l1:
	print(summands(i))


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


(n, t, sp) = (int(input()), 0, [])
for i in range(n):
	sp = []
	t = int(input())
	k = 1
	while True:
		sp.append(t % 10)
		t = t // 10
		if t == 0:
			break
	for i in range(len(sp)):
		sp[i] *= 10 ** i
	while True:
		if 0 in sp:
			sp.pop(sp.index(min(sp)))
		if not 0 in sp:
			break
	print(len(sp))
	print(*sp)


from itertools import count
test_case = int(input())
my_list = []
for i in range(test_case):
	my_list.append(input())
	cluster = str(my_list[i])
	print(len(cluster) - cluster.count('0'))
	for j in range(len(cluster)):
		if cluster[j] != '0':
			print(cluster[j] + '0' * (len(cluster) - j - 1))


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


t = int(input())
for i in range(t):
	n = int(input())
	sum1 = []
	pow1 = 0
	while n > 0:
		r = n % 10
		sum1.insert(0, r * 10 ** pow1)
		n = n // 10
		pow1 = pow1 + 1
	sum1 = [j for j in sum1 if j != 0]
	print(len(sum1))
	for i in sum1:
		print(i, end=' ')
	print('')


t = int(input())
for _ in range(t):
	n = input()
	i = len(n) - 1
	count = 0
	l1 = []
	while i >= 0:
		if n[i] != '0':
			correction = len(n) - 1 - i
			cf = 10 ** correction
			count = count + 1
			l1.append(int(n[i]) * cf)
		i = i - 1
	print(count)
	for i in l1:
		print(i, end=' ')
	print()


t = int(input())
nums = []
for i in range(t):
	nums.append(input())
for t in nums:
	res = []
	for (i, n) in enumerate(t[::-1]):
		if int(n) % 10 != 0:
			res.append(n + '0' * i)
	print(len(res))
	print(*res)


t = int(input())
while t:
	n = int(input())
	if str(n)[1:] == '0' * (len(str(n)) - 1):
		print(1)
		print(n)
	else:
		parts = []
		chars = str(n)
		for (ind, char) in enumerate(chars):
			if char != '0':
				part = char + '0' * (len(chars) - (ind + 1))
				parts.append(part)
		print(len(parts))
		print(' '.join(parts))
	t -= 1


n = int(input())
for j in range(n):
	m = str(input())
	l = []
	r = len(m)
	c = -1
	t = 0
	for i in range(r - 1, -1, -1):
		c += 1
		if m[i] != '0':
			if c == 0:
				l.append(m[i])
				t += 1
			else:
				y = m[i] + '0' * c
				l.append(y)
				t += 1
	print(t)
	print(*l)


a = int(input())
for x in range(a):
	b = list(input())
	c = ''
	sum = 0
	for i in range(len(b)):
		if b[i] != '0':
			v = int(b[i]) * 10 ** (len(b) - i - 1)
			c += str(v) + ' '
			sum += 1
		else:
			continue
	print(sum)
	print(c)


t = int(input())
for i in range(1, t + 1):
	n = int(input())
	a = []
	k = z = 0
	while n > 0:
		a.append(n % 10)
		if n % 10 != 0:
			z += 1
		n = n // 10
		k += 1
	print(z)
	for j in range(k):
		if a[j] != 0:
			print(a[j] * 10 ** j)


import getopt
import sys
import math
onlyCase = -1
verbose = False
try:
	(opts, args) = getopt.getopt(sys.argv[1:], 'vc:', ['case='])
except getopt.GetoptError as err:
	print(str(err))
	sys.exit(2)
for (o, a) in opts:
	if o in ('-c', '--case'):
		onlyCase = int(a)
	elif o == '-v':
		verbose = True
	else:
		sys.exit()
ncases = int(input())
for c in range(1, ncases + 1):
	N = int(input())
	if onlyCase != -1 and onlyCase != c:
		continue
	s = []
	c = 0
	while N > 0:
		r = N % 10
		if r > 0:
			s.append(r * 10 ** c)
		N = N // 10
		c += 1
	print(len(s))
	print(' '.join(map(str, s)))


for _ in range(int(input())):
	n = int(input())
	b = str(n)
	c = len(b)
	d = []
	k = 0
	for i in range(c):
		if b[i] == '0':
			continue
		else:
			k = int(b[i]) * 10 ** (c - (i + 1))
			d.append(k)
	print(len(d))
	print(*d)


for t in range(int(input())):
	n = list(input())
	l = len(n)
	l1 = []
	c = 1
	for i in range(1, l):
		if n[i] != '0':
			l1.append(int(n[i]) * 10 ** (l - i - 1))
			c += 1
	l1.append(int(n[0]) * 10 ** (l - 1))
	print(c)
	print(*l1)


test = int(input())
while test > 0:
	n = input()
	terms = []
	for i in range(0, len(n)):
		if n[i] > '0':
			terms.append(n[i] + '0' * (len(n) - i - 1))
	print(len(terms))
	for i in terms:
		print(i, end=' ')
	print()
	test = test - 1


t = int(input())
for _ in range(t):
	n = int(input())
	ans = set()
	s = 10
	i = len(str(n))
	c = 10
	k = 1
	while i > 0:
		if n % c != 0:
			ans.add(int(str(n % c)[0] + '0' * (len(str(n % c)) - 1)))
		c *= 10
		k *= 10
		i -= 1
	print(len(list(ans)))
	for i in list(ans):
		print(i, end=' ')
	print()


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


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


t = int(input())
while t:
	t -= 1
	n = input()
	l = []
	for i in range(len(n)):
		if int(n[i]):
			l += [int(n[i]), len(n) - i]
	print(int(len(l) / 2))
	for i in range(0, len(l), 2):
		print(l[i] * 10 ** (l[i + 1] - 1), '', end='')
	print()


try:
	t = int(input())
	while t > 0:
		n = int(input())
		c = 0
		l = []
		while n > 0:
			x = n % 10
			l.append(x * 10 ** c)
			c = c + 1
			n = n // 10
		print(len(l) - l.count(0))
		for i in l:
			if i != 0:
				print(i, end=' ')
		print()
		t = t - 1
except:
	pass


t = int(input())
l1 = []
for i in range(t):
	l1.append(int(input()))
for n in l1:
	c = 0
	l = []
	j = 0
	while n > 0:
		rem = n % 10
		if rem != 0:
			c += 1
			l.append(rem * 10 ** j)
		n //= 10
		j += 1
	print(c)
	if len(l) > 0:
		for i in range(len(l)):
			print(l[i], end=' ')
	print()


def xyz():
	t = int(input())
	while t:
		n = int(input())
		(y, count, store) = (n, 0, [])
		if n < 10:
			print(1)
			print(n)
		else:
			while n:
				count += 1
				n //= 10
			start = 0
			while start <= count - 1:
				rem = y % 10
				if rem:
					store.append(rem * 10 ** start)
				y //= 10
				start += 1
			print(len(store))
			print(*store)
		t -= 1
xyz()


def main():
	n = int(input())
	power = 0
	ans = []
	power = 0
	while n > 0:
		if n % 10 > 0:
			ans.append(n % 10 * 10 ** power)
		power += 1
		n = n // 10
	print(len(ans))
	print(*ans)
t = int(input())
for _ in range(t):
	main()


t = int(input())
for i in range(0, t):
	n = input()
	if int(n) < 10:
		print(1)
		print(n)
	else:
		c = len(n)
		count = 0
		for i in range(0, c):
			if int(n[i]) != 0:
				count += 1
		print(count)
		for i in range(0, c):
			if int(n[i]) != 0:
				if i != c - 1:
					print(int(n[i]) * 10 ** (c - i - 1), end=' ')
				else:
					print(n[i] * 10 ** (c - i - 1))


m = int(input())
while m:
	n = int(input())
	a = 0
	l1 = []
	i = 0
	while n:
		if n % 10 != 0:
			a = a + 1
			l1.append(n % 10 * 10 ** i)
		i = i + 1
		n = n // 10
	print(a)
	print(*l1)
	m = m - 1


for j in range(int(input())):
	a = int(input())
	l = []
	c = 1
	while a:
		t = a % (10 * c)
		a = a - t
		c *= 10
		if t != 0:
			l.append(t)
	print(len(l))
	for k in l:
		print(k, end=' ')


for _ in range(int(input())):
	n = input()
	nn = len(n)
	if nn > 1:
		lst = []
		j = 0
		for i in n[::-1]:
			if i != '0':
				lst.append(i + '0' * j)
			j += 1
		print(len(lst))
		for i in lst:
			print(i, end=' ')
		print()
	else:
		print(1)
		print(n)


from itertools import chain
t = int(input())
rounds = []
for pw in range(5):
	for num in range(1, 10):
		rounds.append(num * 10 ** pw)
for case in range(t):
	n = int(input())
	ans = []
	total = n
	current = len(rounds) - 1
	while total > 0:
		while total - rounds[current] >= 0:
			total -= rounds[current]
			ans.append(rounds[current])
		current -= 1
	print(len(ans))
	print(' '.join((str(x) for x in ans)))


t = int(input())
for tt in range(t):
	n = input()
	j = len(n) - 1
	a = []
	b = []
	c = 0
	for i in range(0, len(n)):
		x = int(n[i])
		y = x * 10 ** j
		if y > 0:
			c = c + 1
			a.append(y)
		j = j - 1
	for i in range(0, len(a)):
		if i == len(a) - 1:
			b.append(str(a[i]))
		else:
			b.append(str(a[i]))
			b.append(' ')
	g = ''
	d = g.join(b)
	print(c)
	print(d)


def count1(n):
	count = 0
	while n > 0:
		count = count + 1
		n = n // 10
	return count
testcase = int(input())
for i in range(testcase):
	num = int(input())
	count4 = count1(num)
	li = []
	if num % 10 ** (count4 - 1) == 0:
		print(1)
		print(num)
	else:
		while count4 > 0:
			var = num // 10 ** (count4 - 1) * 10 ** (count4 - 1)
			num = num % 10 ** (count4 - 1)
			if var != 0:
				li.append(var)
			count4 -= 1
		print(len(li))
		for i in li:
			print(i, end=' ')
		print()


n = int(input())
for i in range(n):
	c = 0
	m = input()
	for j in range(len(m)):
		if m[j] != '0':
			c = c + 1
	print(c)
	for i in range(len(m)):
		if m[i] != '0':
			print(str(m[i]) + str(int(len(m) - i - 1) * '0'), end=' ')
	print(end='\n')


from sys import stdin, stdout
for testcases in range(int(stdin.readline())):
	n = int(stdin.readline())
	t = 0
	result = []
	while n > 0:
		if n % 10 != 0:
			result.append(n % 10 * 10 ** t)
		t += 1
		n //= 10
	stdout.write(str(len(result)) + '\n')
	print(*result)


import sys, os
from collections import defaultdict, deque
from math import ceil, floor
if sys.version_info[1] >= 5:
	from math import gcd
else:
	from fractions import gcd
sys.setrecursionlimit(10 ** 6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0

def main(given=sys.stdin.readline):
	input = lambda : given().rstrip()
	LMIIS = lambda : list(map(int, input().split()))
	II = lambda : int(input())
	MOD = 10 ** 9 + 7
	N = II()
	for _ in range(N):
		n = input().rstrip()
		ans = []
		for i in range(len(n)):
			x = int(n[i])
			if x != 0:
				ans.append(x * 10 ** (len(n) - i - 1))
		print(len(ans))
		print(*ans)
main()


t = int(input())
for i in range(t):
	n = int(input())
	x = 0
	s = []
	while n > 0:
		z = n % 10
		if z != 0:
			s.append(str(z * 10 ** x))
		n = n // 10
		x = x + 1
	print(len(s))
	print(' '.join(s))


from math import floor, log10
N = int(input())
for i in range(N):
	k = int(input())
	li = []
	while k > 0:
		if k < 10:
			li.append(k)
			break
		temp = k // 10 ** (len(str(k)) - 1) * 10 ** (len(str(k)) - 1)
		li.append(temp)
		k -= temp
	print(len(li))
	for k in range(len(li)):
		if k == len(li) - 1:
			print(li[k])
		else:
			print(li[k], end=' ')


t = int(input())
for i in range(t):
	num = input()
	n = len(num) - 1
	l = []
	for i in num:
		temp = int(i) * 10 ** n
		if temp != 0:
			l.append(temp)
		n -= 1
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


num_test_case = int(input())
list_output = []
min_no_sum = []
while num_test_case > 0:
	num = int(input())
	temp = num
	count = 0
	while temp > 0:
		temp = int(temp / 10)
		count += 1
	temp = num
	sum_count = 0
	while temp > 0 and count > 0:
		quetient = int(temp / 10 ** (count - 1))
		if quetient > 0:
			list_output.append(int(quetient * 10 ** (count - 1)))
			sum_count += 1
			temp = int(temp % 10 ** (count - 1))
		count -= 1
	min_no_sum.append(sum_count)
	num_test_case -= 1
i = 0
while i < len(list_output):
	for j in min_no_sum:
		print(j)
		while j > 0:
			print(list_output[i], end=' ')
			i += 1
			j -= 1
		print()


t = int(input())
while t > 0:
	n = int(input())
	if n <= 10:
		print('1')
		print(n)
	else:
		lp = n
		l1 = []
		while n != 0:
			a = n % 10
			l1.append(a)
			n = n // 10
		print(len(l1) - l1.count(0))
		if len(l1) == 1:
			print(lp)
		else:
			for i in range(len(l1)):
				if l1[i] == 0:
					pass
				else:
					print(l1[i] * 10 ** i, end=' ')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	N = list(str(n))
	n1 = len(N)
	a = []
	while n1 > -1:
		b = n // 10 ** n1
		if b > 0:
			a.append(str(b * 10 ** n1))
		n -= b * 10 ** n1
		n1 -= 1
	print(len(a))
	print(' '.join(a))


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


t = int(input())
for i in range(t):
	num = input()
	li = []
	size = 0
	le = len(num)
	for j in range(le):
		if num[j] != '0':
			li.append(int(num[j]) * 10 ** (le - j - 1))
			size += 1
	print(size)
	for k in li:
		print(k)


n = int(input())
mylist = []
terms = 0
for i in range(n):
	mylist.append(input())
for i in mylist:
	count = 0
	terms = 0
	term = []
	for j in i[::-1]:
		if j != '0':
			weight = int(j) * 10 ** count
			term.append(weight)
			terms += 1
		count += 1
	print(terms)
	print(*term)


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
sys.setrecursionlimit(10 ** 5)

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def solve():
	l = list(sys.stdin.readline().strip('\n'))
	print(len(l) - l.count('0'))
	while len(l) != 0:
		if l[0] != '0':
			print(l[0] + '0' * (len(l) - 1), end=' ')
			l.remove(l[0])
		else:
			l.remove(l[0])
	print()
for _ in range(II()):
	solve()


test = int(input())
for i in range(test):
	n = int(input())
	temp = []
	while n > 0:
		temp.append(n % 10)
		n //= 10
	l = len(temp)
	ans = []
	for i in range(l):
		if temp[i] != 0:
			ans.append(temp[i] * 10 ** i)
	print(len(ans))
	print(*ans)


TEST = int(input())
answers = []
for _ in range(TEST):
	num = int(input())
	st_num = str(num)
	init = 1
	ans = []
	for c in st_num[::-1]:
		if c != '0':
			ans.append(int(c) * init)
		init *= 10
	answers.append(ans)
for ans in answers:
	print(len(ans))
	print(*ans)


def sum_round(n):
	L = []
	s = str(n)
	for i in range(len(s)):
		if s[i] != '0':
			L.append(int(s[i]) * 10 ** (len(s) - 1 - i))
	s1 = ''
	for i in L:
		s1 = s1 + str(i) + ' '
	return [s1, len(L)]
t = int(input())
for i in range(t):
	n = int(input())
	l = sum_round(n)
	print(l[1])
	print(l[0])


a = []
n = int(input())
for i in range(n):
	a.append(int(input()))
for elem in a:
	len = 0
	s = 0
	count = 0
	for k in str(elem):
		if k != '0':
			len += 1
	print(len)
	while elem // 10 >= 0:
		if elem % 10 != 0:
			count += 1
			print(elem % 10 * 10 ** s, end=' ')
		s += 1
		elem = elem // 10
		if elem == 0:
			print()
			break


for _ in range(int(input())):
	N = int(input())
	count = 0
	t = 1
	llist = []
	while N:
		if N % 10 != 0:
			llist.append(N % 10 * t)
		t = t * 10
		N = N // 10
	print(len(llist))
	print(*llist)


for _ in range(int(input())):
	n = int(input())
	f = 1
	c = []
	x = []
	while n != 0:
		if n % 10 != 0:
			x.append(n % 10 * f)
		n = n // 10
		f *= 10
	x.reverse()
	print(len(x))
	print(*x)


t = int(input())
while t:
	no = input()
	l = len(no)
	st = ''
	count = 0
	for i in range(l):
		if no[i] != '0':
			count += 1
			abc = no[i] + (l - i - 1) * '0' + ' '
			st += abc
	print(count)
	print(st)
	t = t - 1


t = int(input())
for i in range(t):
	x = int(input())
	x = int(x)
	k = 1
	a = []
	while x > 0:
		q = x % 10 * k
		if q > 0:
			a.append(q)
		k *= 10
		x //= 10
	print(len(a))
	print(*a)


t = int(input())
for _ in range(t):
	s = input()
	lst = []
	for i in range(len(s)):
		if s[len(s) - 1 - i] != '0':
			sol = int(s[len(s) - i - 1]) * 10 ** i
			lst.append(sol)
		else:
			continue
	print(len(lst))
	print(*lst)


import sys

def find_parts(num: int):
	i = 1
	parts = []
	while num // 10 != 0:
		part = num % 10
		if part != 0:
			parts.append(str(part * i))
		i *= 10
		num = num // 10
	else:
		parts.append(str(num * i))
	return parts
data = [line.strip() for line in sys.stdin]
for num in data[1:]:
	answer = find_parts(int(num))
	print(len(answer))
	print(' '.join(answer))


t = int(input())
for i in range(t):
	n = int(input())
	k = str(n)
	l = len(k)
	array = []
	while l > 1:
		b = pow(10, l - 1)
		n1 = n // b
		array.append(b * n1)
		n = n % b
		k = str(n)
		l = len(k)
	if not n == 0:
		array.append(n)
	print(len(array))
	for j in array:
		print('{} '.format(j), end='')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	ans = []
	mul = 1
	while n > 0:
		temp = n % 10 * mul
		if temp != 0:
			ans.append(temp)
		mul *= 10
		n = n // 10
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


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


for _ in range(int(input())):
	n = int(input())
	s = []
	mul = 1
	count = 0
	while n > 0:
		a = n % 10
		if a != 0:
			count += 1
			s.append(str(a * mul))
		n = n // 10
		mul *= 10
	print(count)
	print(*s)


def f():
	n = list(input())
	k = []
	for i in range(len(n)):
		k += [n[i] + '0' * (len(n) - i - 1)]
		for j in range(i - len(n) + 1):
			k[i] += '0'
	for i in range(len(k) - 1, -1, -1):
		if int(k[i]) == 0:
			k.pop(i)
	print(len(k))
	for i in range(len(k)):
		print(k[i], end=' ')
t = int(input())
for i in range(t):
	f()


from sys import stdin, stdout
t = int(stdin.readline())
while t > 0:
	n = int(stdin.readline())
	ans = []
	l = 0
	while n:
		r = n % 10
		if r > 0:
			ans.append(r * 10 ** l)
		n //= 10
		l += 1
	stdout.write('{}\n'.format(len(ans)))
	for i in range(len(ans)):
		stdout.write('{} '.format(ans[i]))
	stdout.write('\n')
	t -= 1


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


for i in range(int(input())):
	n = int(input())
	ans = []
	i = 0
	while n > 0:
		if n % 10 != 0:
			ans.append(n % 10 * 10 ** i)
			n = n // 10
		else:
			n = n // 10
		i += 1
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


ii = lambda : int(input())
si = lambda : input()
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
for _ in range(0, ii()):
	n = ii()
	a = list(str(n))
	k = []
	c = 0
	for i in range(len(a) - 1, -1, -1):
		if a[i] != '0':
			k.append(str(a[i] + '0' * c))
		c = c + 1
	print(len(k))
	print(' '.join(k))


t = int(input())
for _ in range(t):
	s = input()
	s = s[::-1]
	c = 0
	a = []
	for i in s:
		if i != '0':
			a.append(i + '0' * c)
		c = c + 1
	print()
	print(len(a))
	for i in a:
		print(i, end=' ')


def func(numm, dup):
	lst = []
	ten = 10
	for i in range(len(str(numm))):
		flag = dup % ten
		if flag != 0:
			lst.append(flag)
		dup -= flag
		ten *= 10
	print(len(lst))
	for j in range(len(lst)):
		if j == len(lst) - 1:
			print(lst[j])
		else:
			print(lst[j], end=' ')
tests = int(input())
for i in range(tests):
	numm = int(input())
	dup = numm
	func(numm, dup)


t = int(input())
for _ in range(t):
	n = input()
	d = n
	print(len(d.replace('0', '')))
	for i in range(len(n)):
		p = int(n[i]) * 10 ** (len(n) - i - 1)
		if p != 0:
			print(p, end=' ')
	print('')


import math
t = int(input())
for i in range(t):
	n = input()
	n = int(n)
	list1 = list()
	count = 0
	k = 0
	while n > 0:
		d = n % 10
		n = n // 10
		if d != 0:
			list1.append(d * 10 ** k)
			count += 1
		k += 1
	print(count)
	for j in list1:
		print(j, end=' ')
	print('\n')


t = int(input())
for i in range(t):
	n = int(input())
	l = []
	count = 0
	while n != 0:
		check = n % 10
		if check == 0:
			n = int(n / 10)
			count += 1
			continue
		l.append(str(check * 10 ** count))
		n = int(n / 10)
		count += 1
	print(len(l))
	print(' '.join(l))


def createList(a_string):
	a_string = list(a_string)
	a = []
	for i in a_string:
		a.append(int(i))
	return a

def simpleSlag(a_list):
	b = len(a_list) - 1
	flag = 0
	ans = []
	c = 10 ** b
	for i in a_list:
		if i != 0:
			flag += 1
			ans.append(i * c)
		else:
			pass
		c = int(c / 10)
	return (flag, ans)

def outputResults(resSlag):
	print(resSlag[0], end='\n')
	b = resSlag[1]
	for i in b:
		print(i, end=' ')
	print(end='\n')

def inputResults():
	t = int(input(''))
	resSlags = []
	for i in range(t):
		j = createList(input(''))
		resSlags.append(simpleSlag(j))
	for i in range(len(resSlags)):
		outputResults(resSlags[i])
inputResults()


def main():
	t = int(input())
	for _ in range(t):
		l = []
		n = input()
		div = len(n)
		div = pow(10, div - 1)
		n = int(n)
		while n > 10 and n % div != 0:
			rem = n % div
			l.append(n - rem)
			n = rem
			div = div // 10
		l.append(n)
		while 0 in l:
			l.remove(0)
		print(len(l))
		for i in l:
			print(i, end=' ')
		print()
main()


T = int(input())
for i in range(T):
	s = list(input())
	p = s.count('0')
	q = len(s)
	l = []
	k = 0
	for j in range(q):
		if s[j] != '0':
			l.append(s[j] + '0' * (q - j - 1))
		else:
			continue
	print(len(l))
	print(*l)


def main():
	Q = int(input())
	while Q:
		N = input()
		k = 0
		finalList = []
		for i in reversed(range(len(N))):
			tenMultiplier = int(N[i]) * pow(10, k)
			if tenMultiplier != 0:
				finalList.append(tenMultiplier)
			k += 1
		print(len(finalList))
		print(*finalList)
		Q -= 1
main()


m = int(input())
for i in range(m):
	l = int(input())
	k = '10'
	(c, ll) = (0, [])
	while l != 0:
		x = l % int(k)
		if x != 0:
			c += 1
			ll.append(x)
		l = l - x
		k = k + '0'
	print(c)
	print(*ll)


def find_solution(x):
	round_number = []
	for (idx, i) in enumerate(x[::-1]):
		if i == '0':
			continue
		else:
			round_number.append(i + '0' * idx)
	print(len(round_number))
	print(' '.join(round_number))

def main():
	t = int(input())
	input_list = [input() for i in range(t)]
	for i in input_list:
		find_solution(i)
main()


from sys import stdin
inp = stdin.readline
t = int(inp().strip())
while t:
	t -= 1
	n = inp().strip()
	sizen = len(n)
	ans = []
	for (i, char) in enumerate(n):
		if char != '0':
			ans.append(int(char) * 10 ** (sizen - i - 1))
	print(len(ans))
	print(*ans)


test = int(input())
for _ in range(test):
	n = int(input())
	t = 0
	lis = []
	count = 0
	while n != 0:
		d = n % 10
		if d != 0:
			if t == 0:
				lis.append(d)
				count += 1
			else:
				lis.append(int(d * 10 ** t))
				count += 1
		n = n // 10
		t += 1
	print(count)
	for i in lis:
		print(i, end=' ')
	print()


T = int(input())
for k in range(T):
	n = input()
	n1 = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		else:
			c = int(n[i]) * 10 ** (len(n) - i - 1)
			n1.append(c)
	print(len(n1))
	print(*n1)


for i in range(int(input())):
	x = int(input())
	s = list(str(x))
	t = []
	for i in range(len(s)):
		if int(s[i]) != 0:
			t.append(int(s[i]) * 10 ** (len(s) - i - 1))
	print(len(t))
	print(*t)


for _ in range(int(input())):
	n = int(input())
	s = str(n).replace('0', '')
	k = len(s)
	l = []
	for i in range(k):
		temp = int(str(n)[0] + '0' * (len(str(n)) - 1))
		l.append(temp)
		n = n - temp
	print(k)
	print(*l)


n = int(input())
arr = []
for i in range(n):
	arr.append(int(input()))
for i in range(len(arr)):
	if arr[i] % 10 == arr[i]:
		print(1)
		print(arr[i])
		continue
	temp = arr[i]
	count = 0
	x = 1
	ans = []
	while temp:
		if temp % 10 != 0:
			count += 1
		if temp % 10 != 0:
			ans.append(temp % 10 * x)
		temp = int(temp / 10)
		x = x * 10
	print(count)
	print(*ans)


t = int(input())
for _ in range(t):
	n = int(input())
	s = list(str(n))
	a = []
	x = ''
	c = 0
	while len(s) > 0:
		if s[0] != '0':
			x = s.pop(0)
			x += '0' * len(s)
			a.append(x)
			c += 1
		else:
			s.pop(0)
	print(c)
	for i in a:
		print(i, end=' ')
	print()


t = int(input())
for q in range(t):
	n = int(input())
	s = str(n)
	k = len(s)
	ans = []
	for i in range(k):
		if s[i] == '0':
			continue
		else:
			ans.append(s[i] + '0' * (k - i - 1))
	print(len(ans))
	for i in range(len(ans)):
		print(ans[i], end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 10:
		print(1)
		print(n)
	else:
		c = i = rem = 0
		l = []
		while n > 0:
			rem = n % 10
			if rem > 0:
				l.append(rem * 10 ** i)
				c += 1
			i += 1
			n = n // 10
		print(c)
		for i in l:
			print(i, end=' ')
		print()


t = int(input())
for i in range(t):
	n_list = list(input())
	n_keta = len(n_list)
	ans = []
	ans_num = 0
	for t in n_list:
		n = int(t)
		if not n == 0:
			ans_num += 1
			ans.append(n * 10 ** (n_keta - 1))
		n_keta -= 1
	print(ans_num)
	print(' '.join(map(str, ans)))


t = int(input())
for _ in range(t):
	n = str(input())
	c = len(n)
	count = 0
	ans = []
	for i in range(c):
		if int(n[i]) != 0:
			count = count + 1
			ans.append(int(n[i]) * 10 ** (c - i - 1))
	print(count)
	print(*ans, sep=' ')


import sys
input = sys.stdin.readline
import bisect
t = int(input())
while t:
	n = int(input())
	po = 1
	res = []
	while n != 0:
		r = n % 10
		if r != 0:
			res.append(r * po)
		n = n // 10
		po = po * 10
	print(len(res))
	print(*res)
	t -= 1


def convert(num):
	arr = []
	counter = 0
	while num > 0:
		if num % 10:
			arr.append(num % 10 * 10 ** counter)
		num //= 10
		counter += 1
	return arr
for _ in range(int(input())):
	num = int(input())
	ans = convert(num)
	print(len(ans))
	print(*ans)


t = int(input())
while t:
	n = int(input())
	m = len(str(n))
	a = []
	while n > 0:
		k = n % 10
		a.append(k)
		n //= 10
	b = []
	j = 1
	for i in reversed(a):
		b.append(i * pow(10, m - j))
		j += 1
	print(len(b) - b.count(0))
	for i in range(len(b)):
		if b[i] != 0:
			print(b[i], end=' ')
	print()
	t -= 1


from math import *
from collections import *
from itertools import *
from bisect import *

def io():
	return map(int, input().split())

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

def kl(con, x=0):
	if x == 0:
		print('Yes') if con else print('No')
	elif x == 1:
		print('yes') if con else print('no')
	elif x == 2:
		print('YES') if con else print('NO')
MOD = 1000000007
MAX = 2147483647
MIN = -2147483648
p = input
for _ in range(int(p())):
	l = []
	s = p()
	n = int(s)
	c = 1
	while n:
		x = n % 10
		if x != 0:
			l.append(x * c)
		c *= 10
		n //= 10
	print(len(l))
	print(*l)


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()


from sys import stdin, stdout
for test in range(int(stdin.readline())):
	n = int(stdin.readline())
	arr = []
	div = 10
	while n > 9:
		k = n % div
		n = n - k
		arr.append(k)
		div = div * 10
	arr.append(n)
	ans = []
	for i in range(len(arr)):
		if arr[i] != 0:
			ans.append(arr[i])
	print(len(ans))
	print(*ans, sep=' ')


n = int(input())
for i in range(n):
	lst = []
	str = input()
	for j in range(len(str)):
		a = str[j] + '0' * (len(str) - j - 1)
		if int(a) != 0:
			lst.append(a)
	print(len(lst))
	print(*lst)


import bisect
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

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

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def solve():
	n = input()
	length = len(n) - 1
	ans = []
	for i in range(len(n)):
		if n[i] != '0':
			ans.append(n[i] + '0' * length)
		length -= 1
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()
t = int(input())
for _ in range(t):
	solve()


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	s = input()
	n = len(s)
	stdout.write(str(n - s.count('0')) + '\n')
	for i in range(n):
		if s[i] != '0':
			stdout.write(s[i] + '0' * (n - i - 1) + ' ')
	stdout.write('\n')


zr = '0'

def dc(n):
	ln = len(n)
	for (x, t) in enumerate(n):
		if t == zr:
			continue
		yield (t + (ln - x - 1) * zr)
n = int(input())
v = [input() for _ in range(n)]
for x in v:
	d = list(dc(x))
	print(len(d))
	print(*d)


for _ in range(int(input())):
	n = int(input())
	temp = n
	result = []
	c = 1
	k = 0
	while n > 0:
		d = 10 ** c
		if temp % d != 0:
			result.append(temp % d)
			k += 1
		n = n // 10
		temp = temp - temp % d
		c += 1
	print(k)
	if k == 0:
		print(n)
	else:
		final = ''
		for i in result:
			final = final + str(i) + ' '
		print(final[:-1])


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	num = sys.stdin.readline().strip()
	len_num = len(num)
	result = []
	count = 0
	for i in range(len_num):
		if num[i] == '0':
			continue
		result.append(num[i] + '0' * (len_num - 1 - i))
		count += 1
	print(count)
	print(*result)


t = int(input())
for j in range(t):
	n = int(input())
	j = 0
	l = []
	le = 0
	while n > 0:
		if n % 10 != 0:
			l.append(n % 10 * pow(10, j))
			le += 1
		j += 1
		n = n // 10
	print(le)
	for g in range(le):
		if g != le - 1:
			print(l[g], end=' ')
		else:
			print(l[g])


t = int(input())
while t > 0:
	n = input()
	i = 1
	result = []
	for x in n:
		result.append(int(x) * 10 ** (len(n) - i))
		i = i + 1
	result = set(result)
	result = result - {0}
	print(len(result))
	for x in result:
		print(x, end=' ')
	print()
	t = t - 1


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


T = int(input())
for t in range(T):
	n = input()
	n = n[::-1]
	res = []
	for (i, c) in enumerate(list(n)):
		c = int(c)
		i = int(i)
		if c != 0:
			res.append(c * 10 ** i)
	print(len(res))
	print(' '.join(map(str, res)))


def solve_task(n):
	if n == '0':
		return ['0']
	if len(n) == 1:
		return [n]
	res = []
	for i in range(len(n)):
		if n[-1 - i] != '0':
			res.append(str(n[-1 - i]) + '0' * i)
	return res

def main():
	n_test = int(input())
	solutions = []
	for nt in range(n_test):
		solutions.append(solve_task(str(input())))
	for s in solutions:
		print(len(s))
		res = ' '.join(s)
		print(res)
main()


try:
	import sys
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except BaseException:
	pass
t = int(input())
for _ in range(t):
	n = list(reversed(list(map(int, input()))))
	arr = []
	for (i, ch) in enumerate(n, 0):
		num = ch * 10 ** i
		if num:
			arr.append(num)
	print(len(arr))
	print(*arr)


for i in range(int(input())):
	s = input()
	div = 1
	lst = []
	if len(s) > 1:
		for j in range(len(s) - 1):
			div *= 10
	k = 1
	while True:
		lst.append(int(s) // div * div)
		if k == len(s):
			break
		s = s[1:]
		if int(s) == 0:
			break
		s = str(int(s))
		div = 1
		if len(s) > 1:
			for j in range(len(s) - 1):
				div *= 10
	print(len(lst))
	print(*lst)


n = int(input())
for i in range(n):
	s = int(input())
	l = []
	j = 0
	while s > 0:
		if not s % 10 == 0:
			l.append(s % 10 * 10 ** j)
		s //= 10
		j += 1
	print(len(l))
	for i in l:
		print(i, end=' ')


for _ in range(int(input())):
	n = input()
	x = len(n) - 1
	z = []
	for i in range(len(n)):
		if int(n[i]) == 0:
			x -= 1
			continue
		z.append(int(n[i]) * 10 ** x)
		x -= 1
	print(len(z))
	for i in z:
		print(i, end=' ')
	print()


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


n = int(input())
for x in range(n):
	req_no = int(input())
	print_str = ''
	sum = 1
	summand = 0
	while req_no > 0:
		remainder = req_no % 10
		if remainder > 0:
			summand += 1
			print_str = print_str + str(remainder * sum) + ' '
		req_no = int((req_no - remainder) / 10)
		sum *= 10
	print(str(summand))
	print(print_str)


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


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


n = int(input())
for i in range(n):
	no = int(input())
	decimal_place = 1
	count = 0
	tmp = no
	rnd = []
	while tmp > 0:
		cur = tmp % 10
		if cur == 0:
			pass
		else:
			rnd.append(cur * decimal_place)
			count = count + 1
		decimal_place = decimal_place * 10
		tmp = tmp // 10
	print(count)
	for j in rnd:
		print(j, end=' ')


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


t = int(input())
for _ in range(t):
	n = int(input())
	num1 = []
	num = list(str(n))
	num.reverse()
	for i in range(len(num)):
		if int(num[i]) * 10 ** i != 0:
			num1.append(int(num[i]) * 10 ** i)
	num1.reverse()
	print(len(num1))
	print(*num1, sep=' ')


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()


t = int(input())
for _ in range(t):
	n = int(input())
	d = []
	cnt = 0
	while n > 9:
		k = n % 10
		if k != 0:
			cnt += 1
		d.append(k)
		n = n // 10
	d.append(n)
	print(cnt + 1)
	ar = []
	for i in range(len(d)):
		if d[i] != 0:
			ar.append(d[i] * 10 ** i)
	print(*ar)


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


t = int(input())
while t:
	n = input()
	l = len(n)
	n = int(n)
	ans = []
	flag = 0
	while l > 1:
		div = int('1' + '0' * (l - 1))
		num = n // div
		ans.append(div * num)
		n = n % div
		if n <= 10:
			break
		l = len(str(n))
	if n != 0:
		ans.append(n)
	print(len(ans))
	print(*ans)
	t -= 1


def run():
	n = int(input())
	for i in range(n):
		s = input()
		l = len(s)
		s = int(s)
		ans = []
		for i in range(1, l):
			a = 10 ** i
			if s % a != 0:
				ans.append(s % a)
				s -= s % a
		ans.append(s)
		print(len(ans))
		print(*ans)
run()


for _ in range(int(input())):
	n = int(input())
	s = str(n)
	if len(s) - s.count('0') == 1:
		print(1)
		print(n)
	else:
		l = []
		k = 0
		while n > 0:
			t = n % 10
			if t > 0:
				l.append(t * 10 ** k)
			k += 1
			n = n // 10
		print(len(l))
		print(*l)


t = int(input())
while t > 0:
	s = input()
	n = len(s)
	list = []
	i = len(s) - 1
	while i >= 0:
		k = s[i:n]
		if k[0] != '0':
			list.append(k[0] + '0' * (n - i - 1))
		i -= 1
	print(len(list))
	for i in range(len(list)):
		print(list[i], end=' ')
	print()
	t -= 1


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


import math
t = int(input())

def ro(n):
	if n >= 1 and n <= 9:
		return True
	s = str(n)
	if int(s[0]) > 0 and s[1:] == '0' * (len(s) - 1):
		return True
	return False
for _ in range(t):
	n = int(input())
	if ro(n):
		print(1)
		print(n)
	else:
		j = 0
		b = []
		m = 0
		ss = str(n)[::-1]
		for i in range(len(ss)):
			if not ss[i] == '0':
				b.append(int(ss[i]) * 10 ** i)
				j += 1
		print(j)
		print(*b)


import sys
import math
t = int(input())
for i in range(t):
	a = int(input())
	b = str(a)
	b = list(b)
	b = [int(i) for i in b]
	if b.count(0) == len(b) - 1:
		print(1)
		print(a)
	else:
		cnt = 1
		lest1 = []
		pro = 10 ** (len(b) - 1)
		for i in b:
			if i == 0:
				pro /= 10
				continue
			lest1.append(i * pro)
			pro /= 10
		print(len(lest1))
		lest1 = [int(n) for n in lest1]
		print(*lest1, sep=' ')


t = int(input())
for asjdas in range(t):
	n = int(input())
	count = 0
	lis = []
	while n != 0:
		d = n % 10
		if d != 0:
			lis.append(d * int(pow(10, count)))
		n = int(n / 10)
		count += 1
	print(len(lis))
	print(*lis)


n = int(input())
for i in range(n):
	b = input()
	a = int(b)
	j = 0
	l = 0
	s = []
	while a != 0:
		x = a % 10
		if x != 0:
			s.append(x * 10 ** j)
			l += 1
		a = a // 10
		j += 1
	print(l)
	print(*s, sep=' ')


t = int(input())
while t:
	a = input()
	l = []
	ans = 0
	x = len(a)
	for i in range(0, x):
		ii = int(a[i])
		if ii != 0:
			l.append(ii * 10 ** (x - i - 1))
			ans = ans + 1
	print(ans)
	for i in l:
		print(i, end=' ')
	t = t - 1


n = int(input())
for i in range(n):
	x = int(input())
	ans = []
	for q in range(10):
		if x % 10 != 0:
			ans.append(10 ** q * (x % 10))
		x //= 10
	print(len(ans))
	for x in ans:
		print(x, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	l = len(list(str(n)))
	p = 1
	ans = []
	while n > 0:
		r = n % 10
		if r != 0:
			ans.append(r * p)
		n = n // 10
		if l != 0:
			p *= 10
			l -= 1
	print(len(ans))
	print(' '.join([str(x) for x in ans]))


t = int(input())
for i in range(0, t):
	a = input()
	b = 0
	c = []
	for j in range(0, len(a)):
		if eval(a[j]) * 10 ** (len(a) - j - 1) != 0:
			b += 1
			c.append(eval(a[j]) * 10 ** (len(a) - j - 1))
	print(b)
	for x in range(0, len(c)):
		print(c[x], end=' ')


test_cases = int(input())
for _ in range(test_cases):
	n = input()
	number = [x for x in n]
	sum = 0
	numbers = []
	number_of_sum = 0
	for i in range(len(number)):
		if number[i] != '0':
			temp = int(number[i]) * 10 ** (len(number) - i - 1)
			sum += temp
			numbers.append(temp)
			number_of_sum += 1
	print(number_of_sum)
	print(*numbers, sep=' ')


import math
t = int(input())
for tt in range(t):
	n = int(input())
	temp = n
	ze = 0
	digits = []
	while temp > 0:
		ze += 1
		digits.append(temp % 10)
		temp = temp // 10
	ze -= 1
	xx = 10 ** ze
	ans = []
	for i in range(len(digits) - 1, -1, -1):
		yy = digits[i] * xx
		xx = xx // 10
		if yy == 0:
			continue
		ans.append(yy)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def solve(n):
	list1 = []
	count = 0
	while n != 0:
		rem = n % 10
		n = n // 10
		rem *= pow(10, count)
		if rem != 0:
			list1.append(str(rem))
		count += 1
	return list1
n = int(input())
for i in range(n):
	res = solve(int(input()))
	length = len(res)
	print(length)
	print(' '.join(res))


def is_round(s):
	cnt = 0
	li = ['0', '00', '000', '0000']
	if s[0].isnumeric() and s[1:] in li:
		return 1
	else:
		return 0

def find_sum(s):
	li = []
	new_li = []
	zero = ['0', '00', '000', '0000']
	if is_round(s) == 1:
		new_li.append(s)
	else:
		s = list(s)
		for i in range(len(s)):
			li.append(s[i] + '0' * (len(s) - i - 1))
		for i in range(len(li)):
			if li[i] not in zero:
				new_li.append(li[i])
	return (len(new_li), new_li)
for _ in range(int(input())):
	n = input()
	(x, li) = find_sum(n)
	print(x)
	print(' '.join(li))


x = int(input())
for _ in range(x):
	num = int(input())
	divisor = int('1' + '0' * (len(str(num)) - 1))
	out = []
	while num > 9:
		a = str(num // divisor) + '0' * (len(str(num)) - 1)
		if int(a) != 0:
			out.append(a)
		num = num % divisor
		divisor //= 10
	if num != 0:
		out.append(str(num))
	print(len(out))
	print(' '.join(out))


for _ in range(int(input())):
	num = input()
	print(len([i for i in num if i != '0']))
	s = ''
	k = 1
	for i in num:
		if i != '0':
			s += i + '0' * (len(num) - k) + ' '
		k += 1
	print(s[:-1])


t = int(input())
for i in range(t):
	a = input()
	cnt = 0
	for j in range(len(a)):
		if a[j] != '0':
			cnt += 1
	print(cnt)
	for i in range(len(a)):
		if a[i] != '0':
			print(str(a[i]) + str(int(len(a) - i - 1) * '0'), end=' ')
	print(end='\n')


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


t = int(input())
for _ in range(t):
	n = input()
	l = len(n) - 1
	c = 0
	for i in n:
		if i != '0':
			c += 1
	print(c)
	for i in n:
		if i != '0':
			k = i + '0' * l
			print(k, end=' ')
		l -= 1


def round(n):
	t = ''
	for (e, i) in enumerate(n):
		if i != '0':
			t = t + ' ' + i + '0' * len(n[e + 1:])
	return t[1:]
for _ in [0] * int(input()):
	z = input()
	print(len(round(z).split()))
	print(round(z))


n = int(input())
for _ in range(n):
	a = int(input())
	i = -1
	ans = []
	while a != 0:
		d = a % 10
		a //= 10
		i += 1
		if d == 0:
			continue
		ans.append(d * 10 ** i)
	print(len(ans))
	for i in ans:
		print(i, sep=' ')


for i in range(int(input())):
	x = input()[::-1]
	ls = []
	count = 0
	for j in range(len(x)):
		p = x[j]
		if p != '0':
			count += 1
			z = 10 ** j
			ls.append(int(p) * z)
	print(count)
	print(*ls)


import sys
input = lambda : sys.stdin.readline().strip()
t = int(input())
while t:
	t -= 1
	n = int(input())
	s = str(n)
	ma = len(s) - 1
	i = 0
	ans = []
	while ma >= 0:
		if s[i] != '0':
			ans.append(int(s[i]) * 10 ** ma)
		i += 1
		ma -= 1
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	q = int(input())
	ans = []
	power = 1
	while q:
		digit = q % 10
		if digit != 0:
			ans.append(digit * power)
		power *= 10
		q //= 10
	ans = [str(len(ans)), ' '.join(map(str, ans))]
	print('\n'.join(ans))


for i in range(int(input())):
	n = input()
	coun = 0
	for elem in n:
		if elem != '0':
			coun += 1
	print(coun)
	for j in range(len(n)):
		if n[j] != '0':
			print(n[j] + '0' * (len(n) - 1 - j), end=' ')
	print()


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


for qq in range(int(input())):
	n = int(input())
	ans = []
	dig = 1
	while n:
		if n % 10:
			ans.append(n % 10 * dig)
		n //= 10
		dig *= 10
	print(len(ans))
	print(*ans)


def split(a):
	newList = []
	for i in range(len(a)):
		newList.append(str(a[len(a) - i - 1]) + '0' * i)
	bigList = []
	for i in newList:
		if int(i) != 0:
			bigList.append(i)
	print(len(bigList))
	print(' '.join(bigList))
a = int(input())
for i in range(a):
	split(input())


a = int(input())
for k in range(a):
	n = input()
	b = n
	l = []
	j = 0
	while len(n) != 1:
		if int(n) % 10 != 0:
			l.append(int(n) % 10 * 10 ** j)
		n = str(int(n) // 10)
		j += 1
	l.append(int(n[0]) * 10 ** (len(b) - 1))
	print(len(l))
	st = ''
	for j in l:
		st += str(j) + ' '
	print(st)


for _ in range(int(input())):
	n = int(input())
	p = 0
	l = []
	if n <= 10:
		print(1)
		print(n)
	else:
		while n != 0:
			l.append(int(str(n)[0]) * 10 ** int(len(str(n)) - 1))
			n -= int(str(n)[0]) * 10 ** int(len(str(n)) - 1)
			p += 1
		print(p)
		print(*l)


t = int(input())
for y in range(t):
	n = input()
	l = []
	for j in range(1, len(n)):
		if n[j] == 0:
			print(1)
			print(n)
			break
	if len(n) == 1:
		print(1)
		print(n)
	else:
		for i in range(len(n)):
			l.append(int(n[i]) * 10 ** (len(n) - i - 1))
			while 0 in l:
				l.remove(0)
		print(len(l))
		print(' '.join((str(i) for i in l)))


t = int(input())
for i in range(0, t):
	n = int(input())
	p = 10
	ans = []
	res = 0
	while n > 0:
		if n % p != 0:
			res += 1
			ans.append(n % p)
			n -= n % p
		p *= 10
	print(res)
	for i in range(0, res):
		print(ans[i], end=' ')
	print('')


def ab():
	b = list(input())
	k = len(b)
	f = []
	for i in range(0, k):
		if int(b[i]) > 0:
			f.append(int(b[i]) * 10 ** (k - i - 1))
	print(len(f))
	for j in f:
		print(j, end=' ')
	print()
for i in range(0, int(input())):
	ab()


for _ in range(int(input())):
	n = input()
	length = len(n)
	rounded_form = list((face_value + '0' * (length - index - 1) for (index, face_value) in enumerate(n) if face_value != '0'))
	print(len(rounded_form))
	print(*rounded_form, sep=' ')


def task(n):
	arrs = [10000, 1000, 100, 10, 1]
	results = []
	for value in arrs:
		a = value * (n // value)
		if a > 0:
			results.append(str(a))
		n -= a
	print(len(results))
	print(' '.join(results))
t = int(input())
for i in range(0, t):
	n = int(input())
	task(n)


import sys

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

def sieve(n):
	a = [1] * n
	for i in range(2, n):
		if a[i]:
			for j in range(i * i, n, i):
				a[j] = 0
	return a
for __ in range(int(input())):
	n = input()
	c = 0
	ans = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		else:
			c += 1
			ans.append(n[i] + '0' * (len(n) - i - 1))
	print(c)
	print(*ans)


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


t = int(input())
for i in range(1, t + 1):
	l = []
	n = int(input())
	c = n
	d = 0
	while c > 0:
		d += 1
		c = c // 10
	if n % 10 ** (d - 1) == 0:
		print('1')
		print(n)
	else:
		for j in range(1, d):
			e = n % 10 ** j
			if e != 0:
				l.append(e)
			n -= e
		l.sort(reverse=True)
		l.append(n)
		print(len(l))
		for j in range(len(l)):
			print(l[j], end=' ')
		print('\n')


n = int(input())
for i in range(n):
	number = int(input())
	num = str(number)[::-1]
	if len(num) == 1 and num != '0':
		print(1)
		print(number)
	if len(num) > 1 and num[-1] != '0':
		legal_s = 0
		round_l = []
		for i in range(len(num)):
			if num[i] == '0':
				continue
			else:
				round_l.append(int(int(num[i]) * 10 ** i))
				legal_s += 1
		print(legal_s)
		for k in round_l:
			print(k, end=' ')


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


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


n = int(input())
for i in range(n):
	num = int(input())
	l = []
	c = 0
	while num > 0:
		if num % 10 != 0:
			l.append(str(num % 10) + '0' * c)
		c += 1
		num //= 10
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


s = []
for _ in range(int(input())):
	a = input()
	k = len(a)
	s2 = []
	for j in range(len(a)):
		s3 = k - j - 1
		if a[j] != '0' or len(a) == 1:
			s2.append(a[j] + '0' * s3)
	s.append(s2)
for j in s:
	print(str(len(j)) + '\n' + ' '.join(j))


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


items = int(input())
numbers = []
for i in range(items):
	numbers.append(int(input()))

def check(num):
	answer = []
	if len(str(num)) == 1:
		answer.append(num)
	elif len(str(num)) == 2:
		if num % 10 == 0:
			answer.append(num)
		else:
			answer.append(num // 10 * 10)
			answer.append(num % 10)
	elif len(str(num)) == 3:
		answer.append(num // 100 % 10 * 100)
		if num % 100 // 10 != 0:
			answer.append(num % 100 // 10 * 10)
		if num % 10 != 0:
			answer.append(num % 10)
	elif len(str(num)) == 4:
		answer.append(num // 1000 * 1000)
		if num // 100 % 10 != 0:
			answer.append(num // 100 % 10 * 100)
		if num % 100 // 10 != 0:
			answer.append(num % 100 // 10 * 10)
		if num % 10 != 0:
			answer.append(num % 10)
	else:
		answer.append(num)
	print(len(answer))
	for i in answer:
		print(i, end=' ')
	print()
for num in numbers:
	check(num)


for _ in range(int(input())):
	n = input()
	length = len(n)
	anslis = []
	for i in range(length):
		if n[i] != '0':
			anslis.append(n[i] + '0' * (length - i - 1))
	print(len(anslis))
	for i in anslis:
		print(i)


for _ in [0] * int(input()):
	n = input()
	m = len(n)
	r = []
	for i in range(m):
		if n[i] != '0':
			r += [n[i] + '0' * (m - 1 - i)]
	print(len(r))
	print(*r)


t = int(input())
for _ in range(t):
	n = input()
	ar = [int(i) for i in n]
	m = len(ar)
	ar2 = []
	j = s = 0
	for i in ar:
		if i != 0:
			s = int(i) * 10 ** (m - j - 1)
			ar2.append(s)
		j += 1
	print(len(ar2))
	for i in ar2:
		print(i, end=' ')


from collections import Counter, defaultdict, deque
from operator import itemgetter
import math
import sys
input = sys.stdin.readline

def solve():
	n = int(input())
	res = []
	p = 0
	while n > 0:
		d = n % 10
		if d != 0:
			res.append(d * 10 ** p)
		n //= 10
		p += 1
	print(len(res))
	print(*res)
tt = int(input())
for test in range(tt):
	solve()


x = int(input())
for q in range(0, x):
	a = input()
	b = list(a)
	v = []
	count = 0
	if b[-1] == '0':
		b.pop(-1)
	c = len(b)
	z = 1
	for i in range(0, len(a) - 1):
		z = z * 10
	for j in range(0, c):
		e = int(int(b[j]) * z)
		if e == 0:
			pass
		else:
			v.append(e)
			count = count + 1
		z = z / 10
	print(count)
	v.reverse()
	print(*v)


t = int(input())
for _ in range(t):
	n = input()
	l = len(n) - 1
	nums = [d + '0' * (l - i) for (i, d) in enumerate(n) if d != '0']
	print(len(nums))
	print(*nums)


t = int(input())
for tc in range(t):
	n = input()
	l = len(n)
	out = []
	for c in range(l):
		if n[c].isdigit() and int(n[c]) != 0:
			out.append(n[c] + '0' * (l - c - 1))
	print(len(out))
	print(' '.join((str(x) for x in out)))


import sys
import os
from math import sqrt, log, log2, log10, gcd, floor, pow, sin, cos, tan, pi, inf, factorial
from copy import copy, deepcopy
from sys import exit, stdin, stdout
from collections import Counter, defaultdict, deque
from itertools import permutations
import heapq
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = 1000000007
iinp = lambda : int(sys.stdin.readline())
inp = lambda : sys.stdin.readline().strip()
strl = lambda : list(inp().strip().split(' '))
intl = lambda : list(map(int, inp().split(' ')))
mint = lambda : map(int, inp().split())
flol = lambda : list(map(float, inp().split(' ')))
flush = lambda : stdout.flush()

def permute(nums):

	def fun(arr, nums, cur, v):
		if len(cur) == len(nums):
			arr.append(cur.copy())
		i = 0
		while i < len(nums):
			if v[i]:
				i += 1
				continue
			else:
				cur.append(nums[i])
				v[i] = 1
				fun(arr, nums, cur, v)
				cur.pop()
				v[i] = 0
				i += 1
		return arr
	res = []
	nums.sort()
	v = [0] * len(nums)
	return fun(res, nums, [], v)

def subsets(res, index, arr, cur):
	res.append(cur.copy())
	for i in range(index, len(arr)):
		cur.append(arr[i])
		subsets(res, i + 1, arr, cur)
		cur.pop()
	return res

def sieve(N):
	root = int(sqrt(N))
	primes = [1] * (N + 1)
	(primes[0], primes[1]) = (0, 0)
	for i in range(2, root + 1):
		if primes[i]:
			for j in range(i * i, N + 1, i):
				primes[j] = 0
	return primes

def bs(arr, l, r, x):
	if x < arr[0] or x > arr[len(arr) - 1]:
		return -1
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	p = int(sqrt(n))
	for i in range(5, p + 1, 6):
		if n % i == 0 or n % (i + 2) == 0:
			return False
	return True

def solve():
	s = inp()
	n = len(s)
	p = 0
	ans = []
	for i in range(n - 1, -1, -1):
		if int(s[i]) != 0:
			ans.append(s[i] + '0' * p)
		p += 1
	print(len(ans))
	print(*ans[::-1])
for _ in range(iinp()):
	solve()


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)


t = int(input())
l = []
for i in range(t):
	s = input()
	sub = ''
	for j in range(len(s)):
		if s[len(s) - j - 1] != '0':
			l.append(s[len(s) - j - 1] + '0' * j)
	print(len(l))
	for k in l:
		print(k, end=' ')
	l = []
	print()


for _ in range(int(input())):
	n = input()
	l = len(n)
	lst = []
	count = 0
	for i in range(l):
		if n[i] != '0':
			count += 1
			lst.append(n[i] + '0' * (l - i - 1))
	print(count)
	for i in lst:
		print(i, end=' ')


def RoundNumbers(n):
	lista = []
	n = str(n)
	for (i, j) in enumerate(n):
		if j != '0':
			lista.append(int(j + '0' * (len(n) - (i + 1))))
	string = str(len(lista)) + '\n'
	for k in lista:
		string += str(k) + ' '
	return string
Lista = []
total = int(input())
for i in range(total):
	Lista.append(int(input()))
for j in Lista:
	print(RoundNumbers(j))


n = int(input())
for i in range(n):
	str = input()
	l = []
	for i in range(len(str)):
		if str[i] == '0':
			continue
		if i == len(str) - 1:
			l.append(str[i])
			break
		else:
			a = int(str[i])
			for j in range(len(str) - 1 - i):
				a = a * 10
			l.append(a)
	print(len(l))
	for k in l:
		print(k, end=' ')
	print()


t = int(input())
for _ in range(t):
	x = int(input())
	i = 0
	ans = []
	while x:
		if x % 10:
			ans.append(x % 10 * 10 ** i)
		i += 1
		x //= 10
	print(len(ans))
	print(' '.join(map(str, ans)))


for _ in range(int(input())):
	x = int(input())
	t = 1
	res = []
	while x > 0:
		if x % 10 != 0:
			res.append(x % 10 * t)
		t *= 10
		x //= 10
	print(len(res))
	print(*res)


a = int(input())
c = []
for i in range(a):
	x = str(input())
	c.append(x)
for i in range(len(c)):
	d = c[i]
	l = []
	for j in range(len(d)):
		if d[j] != '0':
			l.append(10 ** (len(d) - j - 1) * int(d[j]))
	print(len(l))
	s = ''
	for i in l:
		s += str(i)
		s += ' '
	print(s)


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


def min_terms(num):
	terms = []
	pos = 1
	while num > 0:
		term = num % 10 * pos
		if term > 0:
			terms.append(term)
		num = num // 10
		pos = pos * 10
	return terms
t = int(input())
for _ in range(t):
	num_ = int(input())
	res_arr = min_terms(num_)
	print(len(res_arr))
	for item in res_arr:
		print(item, end=' ')
	print('')


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


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


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


import sys
input = sys.stdin.readline

def check(s):
	temp = int(s)
	if len(s) == 1:
		return True
	else:
		return temp % 10 ** (len(s) - 1) == 0
tc = int(input())
for _ in range(tc):
	n = input().rstrip()
	l = list()
	count = 0
	temp = 1
	for i in n[::-1]:
		x = int(i) * temp
		if x == 0:
			temp *= 10
			continue
		if check(str(x)):
			count += 1
			l.append(x)
		temp *= 10
	print(count)
	for i in l:
		print(i, end=' ')
	print()


n = int(input())
_round = [1, 10, 100, 1000, 10000]
for i in range(n):
	input_data = input()
	output_data = []
	cnt = 0
	for j in range(len(input_data)):
		if input_data[j] != '0':
			cnt += 1
			index = len(input_data) - j - 1
			output_data.append(str(int(input_data[j]) * _round[index]))
	print(cnt)
	print(' '.join(output_data))


t = int(input())
for _ in range(t):
	n = int(input())
	if 1 <= n <= 9:
		print(1)
		print(n)
		continue
	ans = []
	a = 1
	while n != 0:
		if n % 10 != 0:
			ans.append(a * (n % 10))
		a *= 10
		n //= 10
	print(len(ans))
	print(' '.join(map(str, ans)))


def ans(n):
	l = []
	x = n
	n = list(str(n))
	if len(l) == 1:
		l.append(x)
		return l
	elif len(n) == n.count('0') + 1:
		l.append(x)
		return l
	else:
		i = 0
		while x != 0:
			y = x % 10
			if y != 0:
				l.append(str(y) + '0' * i)
			x = x // 10
			i += 1
		return l
for _ in range(int(input())):
	n = int(input())
	z = ans(n)
	print(len(z))
	print(*z, sep=' ')


for _ in range(int(input())):
	a = []
	s = input()
	n = len(s)
	for i in range(n):
		if s[i] != '0':
			a.append(''.join(s[i] + '0' * (n - i - 1)))
	print(len(a))
	for e in a:
		print(e, end=' ')
	print('')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	num = list(sys.stdin.readline().strip())
	nums = []
	for i in range(len(num) - 1, 0, -1):
		if num[i] != '0':
			nums.append(''.join(num[i:]))
			num[i] = '0'
	nums.append(''.join(num))
	print(len(nums))
	print(' '.join(nums))


t = int(input())
for ___ in range(t):
	n = int(input())
	ans = []
	count = 0
	i = 10
	while i <= n:
		if n % i != 0:
			ans.append(n % i)
		n = n - n % i
		i = i * 10
	ans.append(n)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


for t in range(int(input())):
	x = input()
	l = len(x)
	a = [int(x[i]) * 10 ** (l - 1 - i) for i in range(l) if x[i] != '0']
	print(len(a))
	print(*a)


for _ in range(int(input())):
	my_list = []
	value = int(input())
	number = value
	count = 0
	for i in range(number):
		if number == 0:
			break
		remainder = number % 10
		number = number // 10
		if remainder != 0:
			my_list.append(remainder * 10 ** count)
		count += 1
	print(len(my_list))
	print(*my_list)


ts = int(input())
for _ in range(ts):
	n = input()
	ll = len(n)
	lst = [int(x) * 10 ** (ll - 1 - i) for (i, x) in enumerate(list(n)) if x != '0']
	print(len(lst))
	print(str(lst)[1:-1].replace(',', ''))


t = int(input())
for i in range(t):
	n = int(input())
	s = 0
	nums = []
	for i in range(1, len(str(n)) + 1):
		num = n % 10 ** i
		if num != 0:
			nums.append(str(num))
		n -= num
	print(len(nums))
	print(' '.join(nums))


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


n = int(input())
for i in range(n):
	d = input()
	ld = len(d)
	res = [int(d[n] + ''.join([(ld - n - 1) * str(0)])) if int(d[n]) != 0 else 0 for n in range(ld)]
	res = list(filter(lambda x: x != 0, res))
	print(len(res))
	print(*res)


for _ in range(int(input())):
	n = input()
	l = len(n)
	if l == 1 or int(n[1:]) == 0:
		print(1)
		print(n)
	else:
		d = []
		a = 1
		for i in n[::-1]:
			if int(i) != 0:
				d.append(int(i) * a)
			a = a * 10
		print(len(d))
		for j in d:
			print(j, end=' ')
		print()


for i in range(int(input())):
	n = input()
	print(len(n) - n.count('0'))
	k = 0
	for c in reversed(n):
		if c != '0':
			print(c + '0' * k, end=' ')
		k += 1
	print()


for _ in range(int(input())):
	n = int(input())
	t = 10 ** 4
	ans = []
	while n:
		if n // t > 0:
			ans += [t * (n // t)]
		n %= t
		t //= 10
	print(len(ans))
	print(*ans)


test = int(input())
for t in range(test):
	n = int(input())
	ans = 0
	l = []
	ind = 0
	while n != 0:
		r = n % 10
		if r == 0:
			pass
		else:
			l.append(r * 10 ** ind)
			ans += 1
		ind += 1
		n //= 10
	print(ans)
	for i in l:
		print(i, end=' ')
	print()


t = int(input())
for z in range(t):
	n = input()
	s = ''
	m = len(n)
	c = 0
	for i in range(m):
		if n[i] == '0':
			continue
		s += n[i] + '0' * (m - i - 1) + ' '
		c += 1
	print(c)
	print(s)


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


t = int(input())
for i in range(t):
	x = int(input())
	ans = []
	cnt = 1
	count = 0
	while x != 0:
		last = x % 10
		if last != 0:
			count += 1
			ans.append(last * cnt)
		cnt *= 10
		x //= 10
	print(count)
	print(*ans)


n = int(input())
numbers = [int(input()) for _ in range(n)]
for t in numbers:
	output = ''
	count = 0
	for i in range(len(str(t))):
		rounded_number = int(str(t)[i]) * 10 ** (len(str(t)) - 1 - i)
		if rounded_number != 0:
			count += 1
			output += str(rounded_number) + ' '
	print(count)
	print(output[:-1])


for _ in range(int(input())):
	n = input()
	ln = len(n)
	if ln == 1:
		print(1)
		print(n)
	else:
		res = []
		count = 0
		for i in range(ln):
			if n[i] != '0':
				if i == ln - 1:
					res.append(int(n[i]))
					count += 1
					continue
				res.append(int(n[i]) * 10 ** (ln - i - 1))
				count += 1
		print(count)
		print(*res)


t = int(input())
for i in range(0, t):
	n = int(input())
	print(len(str(n)) - str(n).count('0'))
	l = len(str(n))
	j = 1
	while j < l + 1:
		if n % 10 ** j != 0 and j != l:
			print(str(n % 10 ** j), end=' ')
			n -= n % 10 ** j
		elif n % 10 ** j != 0 and j == l:
			print(str(n % 10 ** j))
		j += 1


t = int(input())
for i in range(t):
	SUM = 0
	summ = []
	count = 0
	l = 100000
	n = int(input())
	shadow_n = n
	while SUM < n:
		k = 0
		l /= 10
		while k == 0:
			k = shadow_n // l
			l /= 10
		l *= 10
		summ.append(int(k * l))
		SUM += k * l
		count += 1
		shadow_n -= k * l
	print(count)
	for i in summ:
		print(i, end=' ')


import math
from collections import Counter, deque
L = lambda : list(map(int, input().split()))
M = lambda : map(int, input().split())
I = lambda : int(input())
IN = lambda : input()
mod = 10 ** 9 + 7

def s(a):
	print(' '.join(list(map(str, a))))
for i in range(I()):
	n = IN()
	c = list(n)
	c.reverse()
	d = []
	for i in range(len(c)):
		if int(c[i]) > 0:
			d.append(int(c[i]) * pow(10, i))
	print(len(d))
	print(*d)


t = int(input().strip(' '))
for _ in range(t):
	n = int(input().strip(' '))
	smds = []
	c = 0
	plc = 1
	while n > 0:
		r = n % 10
		n = n // 10
		if r != 0:
			c += 1
			smds.append(r * plc)
		plc = plc * 10
	print(c)
	print(*smds)


def round(x):
	c = 1
	if x < 10:
		return [c, x]
	else:
		s = x % 10
		u = (x - s) % 100
		v = (x - s - u) % 1000
		w = (x - s - u - v) % 10000
		if x >= 1000:
			if x % 1000 == 0:
				return [1, x]
			elif x == 10000:
				return [1, x]
			elif s == 0 and u == 0:
				return [2, v, w]
			elif s == 0 and v == 0:
				return [2, u, w]
			elif u == 0 and v == 0:
				return [2, s, w]
			elif u == 0:
				return [3, s, v, w]
			elif v == 0:
				return [3, s, u, w]
			elif s == 0:
				return [3, u, v, w]
			else:
				return [4, s, u, v, w]
		elif x >= 100:
			if x % 100 == 0:
				return [1, x]
			elif u == 0:
				return [2, s, v]
			elif s == 0:
				return [2, u, v]
			else:
				return [3, s, u, v]
		elif x >= 10:
			if x % 10 == 0:
				return [1, x]
			return [2, s, u]
t = int(input())
a = []
ans = []
for i in range(t):
	a.append(input())
for i in a:
	ans.append(round(int(i)))
for i in ans:
	print(i[0])
	for j in range(1, len(i)):
		print(i[j], end=' ')
	print()


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	s = []
	i = 1
	while n != 0:
		k = n % 10
		a = k * i
		if a > 0:
			s.append(a)
		i = i * 10
		n = int(n / 10)
	print(len(s))
	print(*s)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		s = str(n)
		l = []
		lens = len(s)
		for i in range(lens):
			if s[i] != '0':
				l.append(s[i] + '0' * (lens - i - 1))
		print(str(len(l)))
		print(' '.join(l))
main()


for i in range(int(input())):
	(a, b, c, d, l, s) = (0, 0, 0, 0, [], [])
	n = int(input())
	lst = list(map(int, str(n)))
	for (i, j) in enumerate(range(len(lst))):
		if lst[i] != 0:
			st = str(lst[i]) + len(lst[i + 1:]) * '0'
			l.append(int(st))
	print(len(l))
	print(*l)


from sys import stdin
for j in range(int(input())):
	n = input()
	a = [int(x) for x in n]
	t = 0
	b = []
	for i in range(len(a)):
		if a[i] != 0:
			b.append(a[i] * 10 ** (len(a) - i - 1))
			t += 1
	print(t)
	for i in range(len(b)):
		print(b[i], end=' ')
	print('')


t = int(input())
for i in range(t):
	n = input()
	length = len(n)
	n_summands = 0
	summands = []
	for (j, digit) in enumerate(n):
		if digit != '0':
			n_summands += 1
			summands.append(digit + '0' * (length - j - 1))
	print(n_summands)
	print(' '.join(summands))


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	for _ in range(ii()):
		s = si()
		a = []
		for i in range(len(s)):
			if s[i] != '0':
				a.append(s[i] + '0' * (len(s) - i - 1))
		print(len(a))
		print(*a)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for i in range(t):
	adds = []
	t = input()
	appends = 0
	for (idx, num) in enumerate(t):
		if int(num) != 0:
			appends += 1
			adds.append(str(num) + str('0' * (len(t) - idx - 1)))
	print(appends)
	print(' '.join(adds))


t = int(input())
for i in range(t):
	n = int(input())
	a = []
	c = 0
	while n > 0:
		d = n % 10
		if d != 0:
			k = pow(10, c)
			j = k * d
			a.append(j)
		n //= 10
		c += 1
	print(len(a))
	for j in range(0, len(a)):
		print(a[j], end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	temp = n
	count = -1
	nos = 0
	ans = ''
	while n > 0:
		count += 1
		digit = n % 10
		n = int(n / 10)
		if digit == 0:
			continue
		nos += 1
		zeroes = ''
		for i in range(count):
			zeroes += '0'
		ans = ans + str(digit) + zeroes + ' '
	print(nos)
	print(ans)


import sys

def func(num):
	mod = 10
	ans = []
	while mod <= num:
		if num % mod != 0:
			ans.append(num % mod)
			num -= num % mod
		mod *= 10
	if num % mod != 0:
		ans.append(num % mod)
	print(len(ans))
	print(' '.join([str(x) for x in ans]))
n = int(sys.stdin.readline())
for _ in range(n):
	num = int(sys.stdin.readline())
	func(num)


import math
n = int(input())
q = []
for i in range(n):
	q.append(int(input()))

def rnd(x, ans):
	l = len(str(x))
	a = math.floor(x / 10 ** (l - 1))
	if l > 1:
		ans.append(a * 10 ** (l - 1))
	else:
		ans.append(x)
	rem = x % 10 ** (l - 1)
	if l > 1 and rem != 0:
		return rnd(x % 10 ** (l - 1), ans)
	else:
		return ans
for i in q:
	ans = rnd(i, [])
	print(len(ans))
	for j in ans:
		print(j)


a = int(input())
for i in range(a):
	b = input()
	c = len(b) - 1
	d = int('1' + '0' * c)
	if int(b) % d == 0:
		print(1)
		print(int(b))
	else:
		f = -1
		m = 0
		g = []
		for j in range(len(b)):
			if b[f] != '0':
				l = int(b[f]) * 10 ** j
				g.append(l)
				m += 1
			f -= 1
		print(m)
		print(*g)


for t in range(int(input())):
	string = input()
	result = []
	n = int(string)
	if string[-1] != '0':
		result.append(int(string[-1]))
	i = 1
	for j in range(2, len(string) + 1):
		if string[j * -1] != '0':
			result.append(int(string[j * -1]) * 10 ** i)
		i += 1
	print(len(result))
	print(*result)


t = int(input())
for _ in range(t):
	n = int(input())
	mul = 1
	arr = []
	while n > 0:
		mul *= 10
		now = n % mul
		if now != 0:
			arr.append(now)
		n = n - now
	print(len(arr))
	print(' '.join((str(num) for num in arr)))


t = int(input())
q = []
for i in range(t):
	c = input()
	s = ''
	j = 0
	if len(c) == 1 and c != '0':
		s = s + c[0]
		q.append(s)
	else:
		while j <= len(c) - 2:
			if c[j] != '0':
				s = s + c[j] + (len(c) - j - 1) * '0' + ' '
				j = j + 1
			else:
				j = j + 1
		if c[len(c) - 1] != '0':
			s = s + c[len(c) - 1]
		q.append(s)
for i in q:
	if i[len(i) - 1] == ' ':
		print(len(i[:len(i) - 1].split(' ')))
		print(i[:len(i) - 1])
	else:
		print(len(i.split(' ')))
		print(i)


t = int(input())
for i in range(t):
	string = input()
	if len(string) == 1 or int(string) % 10 ** (len(string) - 1) == 0:
		numOfRoundNumbers = 1
		listOfRoundNumbers = [int(string)]
	else:
		listOfRoundNumbers = [int(string[0]) * 10 ** (len(string) - 1)]
		numOfRoundNumbers = 1
		for i in range(1, len(string)):
			if string[i] != '0':
				roundNumbers = int(string[i]) * 10 ** (len(string) - 1 - i)
				listOfRoundNumbers.append(roundNumbers)
				numOfRoundNumbers += 1
	print(numOfRoundNumbers)
	print(*listOfRoundNumbers)


def sums(n):
	k = len(n)
	u = int(n)
	results = []
	m = 1
	for i in range(1, k + 1):
		if i == 1:
			m = u % 10 ** i
			if m != 0:
				results.append(m)
		else:
			m = u % 10 ** i - sum(results)
			if m != 0:
				results.append(m)
	return results
results = []
k = int(input())
for i in range(k):
	results.append(sums(input()))
for v in results:
	print(len(v))
	for u in v:
		print(u, end=' ')
	print()


for _ in range(int(input())):
	n = input()
	c = len(n)
	co = 0
	for i in n:
		if i != '0':
			co += 1
	print(co)
	n = int(n)
	for i in range(c):
		x = int(n % 10)
		n /= 10
		if x == 0:
			continue
		print(str(x), end='')
		print(str('0' * i), end=' ')
	print()


t = int(input())
while t > 0:
	t -= 1
	n = input()
	li = []
	for x in range(len(n)):
		res = n[x]
		append_all_zeros = False
		for y in range(x + 1, len(n)):
			if n[y] > '0':
				append_all_zeros = True
				break
		res = res + '0' * (len(n) - x - 1)
		li.append(res)
		if append_all_zeros == False:
			break
	final = []
	for x in li:
		for ele in x:
			if ele > '0':
				final.append(x)
				break
	print(len(final))
	for x in final:
		print(x, end=' ')


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


t = int(input())
for i in range(t):
	n = int(input())
	s = str(n)
	count = 0
	res = []
	for j in range(len(s) - 1, -1, -1):
		if s[-j - 1] != '0':
			count += 1
			res.append(int(s[-j - 1]) * 10 ** j)
	print(count)
	print(*res)


def ans(t):
	l1 = []
	l2 = []
	for i in range(int(t)):
		l1.append(input())
	for en in l1:
		size = len(en)
		c = 0
		while int(en) > 0:
			tp = int(en) % 10 * 10 ** c
			c += 1
			l2.append(tp)
			en = int(int(en) / 10)
		s = ''
		for j in range(len(l2) - 1):
			if 0 in l2:
				l2.remove(0)
		print(len(l2))
		for i in l2:
			s += ' ' + str(i)
		print(s[1:])
		l2 = []
	return
t = input()
ans(t)


n = int(input())
for i in range(n):
	L = []
	num = int(input())
	for j in range(4, -1, -1):
		k = num // 10 ** j
		num -= k * 10 ** j
		if k != 0:
			L.append(str(k * 10 ** j))
	print(len(L))
	print(' '.join(L))


import math as h
t = int(input())
for i in range(t):
	n = int(input())
	a = str(n)
	l = []
	j = len(a) - 1
	for i in a:
		if i != '0':
			d = int(i) * h.pow(10, j)
			l.append(int(d))
			j -= 1
		else:
			j -= 1
	print(len(l))
	print(*l)


def make_list(number):
	while number:
		lst.append(number % 10)
		number = number // 10

def is_no_zero(a):
	if a != 0:
		return True
	else:
		return False

def printer(lst):
	k = 0
	for i in lst:
		if i:
			print(10 ** k * i, end='\t')
		k += 1
t = int(input())
ques = list()
for test_case in range(t):
	ques.append(int(input()))
for test_case in ques:
	lst = list()
	filtered_lst = list()
	make_list(test_case)
	filtered_lst = list(filter(is_no_zero, lst))
	print(len(filtered_lst))
	printer(lst)
	print('\n')


n = int(input())
for i in range(n):
	x = input()
	number = ''
	check = 0
	for num in range(len(str(x))):
		if int(x[num]) != 0:
			check += 1
			number = number + str(int(x[num]) * pow(10, int(len(x) - 1 - num))) + ' '
	print(check)
	print(number)


k = int(input())
for i in range(k):
	num = [int(x) for x in list(input())]
	l = len(num)
	ans = []
	for j in range(l):
		if num[j] != 0:
			ans.append(num[j] * 10 ** (l - j - 1))
	print(len(ans))
	for k in ans:
		print(k, end=' ')
	print()


def main():
	x = int(input())
	array = [list(str(input())) for _ in range(x)]
	for j in array:
		if len(j) - 1 == j.count('0'):
			print(1)
			print(''.join(j))
		else:
			counter = 0
			arr = []
			time_count = 0
			for test in j:
				if test != '0':
					counter += 1
					arr.append(f"{str(test) + '0' * (len(j) - (time_count + 1))}")
				time_count += 1
			print(counter)
			print(' '.join(arr))
main()


k_tests = int(input())
arr = []
new_arr = []
for i in range(k_tests):
	arr.append(int(input()))
for i in range(0, k_tests, 1):
	k = 1
	max_k = 0
	while int(arr[i]) > 0:
		temp = arr[i] % 10
		if temp != 0:
			new_arr.append(k * temp)
			max_k += 1
		k *= 10
		arr[i] = arr[i] // 10
	print(max_k)
	for j in range(max_k):
		print(new_arr[j])
	new_arr = []
arr = []


for t in range(int(input())):
	n = input()
	l = len(n)
	n = int(n)
	s = []
	for i in range(l):
		p = n % 10 * 10 ** i
		n //= 10
		if p != 0:
			s.append(p)
	print(len(s))
	print(*s)


n = int(input())
zero = [1, 10, 100, 1000, 10000]
for x in range(n):
	i = int(input())
	str_l = list(str(i))
	l = len(str_l)
	a = []
	for x in range(len(str_l)):
		if str_l[x] != '0':
			a.append(int(str_l[x]) * zero[l - 1 - x])
	print(len(a))
	print(*a, sep=' ')


for j in range(int(input())):
	n = int(input())
	sn = str(n)
	count = 0
	res = ''
	s = len(sn)
	for i in range(s):
		r = int(sn[i]) * 10 ** (s - i - 1)
		if r == 0:
			continue
		else:
			sr = str(r)
			res += sr
			res += ' '
			count += 1
	print(count)
	print(res)


t = int(input())
for test in range(t):
	k = 0
	ans = []
	n = int(input())
	i = 1
	while i <= n:
		if n % i:
			ans.append(n % i)
			k += 1
			n -= n % i
		i *= 10
	if n % i:
		ans.append(n % i)
		k += 1
		n -= n % i
	i *= 10
	print(k)
	for i in ans:
		print(i)


t = int(input())
inputs = [''] * t
for i in range(t):
	inputs[i] = input()
for s in inputs:
	a = list(map(int, s))
	a.reverse()
	ans = [0] * len(a)
	dst = 0
	for i in range(len(a)):
		if a[i]:
			ans[dst] = a[i] * 10 ** i
			dst += 1
	print(dst)
	print(' '.join(map(str, ans[:dst])))


t = int(input())
for j in range(t):
	s = input()
	lst = list()
	for i in range(len(s)):
		if s[i] != '0':
			n = int(s[i])
			m = n * 10 ** (len(s) - 1 - i)
			lst.append(m)
	print(len(lst))
	for i in lst:
		print(i, end=' ')
	print('\n')


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	s = input()
	print(len(s) - s.count('0') - 1)
	for i in range(len(s) - 1):
		if s[i] != '0':
			print(s[i] + '0' * (len(s) - i - 2), end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	c = 0
	cifri = 0
	ans = []
	while n > 0:
		cifri += 1
		if n % 10 != 0:
			c += 1
			ans.append(n % 10 * 10 ** (cifri - 1))
		n //= 10
	print(c)
	print(*ans)


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


tcs = int(input())
for tc in range(tcs):
	num = input()
	l = len(num)
	res = []
	for i in range(l):
		if num[i] != '0':
			res.append(num[i] + '0' * (l - i - 1))
	print(len(res))
	for r in res:
		print(r, end=' ')
	print()


for t in range(int(input())):
	num = int(input())
	c = 1
	pos_nums = []
	while num != 0:
		z = num % 10
		pos_nums.append(z * c)
		num = num // 10
		c = c * 10
	pos_nums = [i for i in pos_nums if i != 0]
	rev = reversed(pos_nums)
	print(len(pos_nums))
	print(*rev)


t = int(input())
while t:
	ans = list()
	count = 0
	power = 1
	n = int(input())
	while n > 0:
		if n % 10 > 0:
			ans.append(n % 10 * power)
			power = power * 10
			count = count + 1
			n = n // 10
		else:
			power = 10 * power
			n = n // 10
	print(count)
	print(*ans)
	t -= 1


t = int(input())
while t > 0:
	inp = int(input())
	num = 10
	cnt = 0
	tempo = []
	while inp > 0:
		temp = inp % 10 * num ** cnt
		if temp != 0:
			tempo.append(temp)
		inp = int(inp / 10)
		cnt += 1
	print(len(tempo))
	for i in range(len(tempo)):
		print(tempo[i], end=' ')
	print()
	t -= 1


t = int(input())
for _ in range(t):
	l = input()
	count = 0
	a = []
	for x in range(len(l)):
		if l[x] != '0':
			c = l[x]
			for t in range(x, len(l) - 1):
				c = c + '0'
			a.append(c)
			count = count + 1
	print(count)
	for x in a:
		print(x, end=' ')
	print()


def main():
	t = int(input())
	cases = [input() for i in range(t)]
	for n in cases:
		nor = []
		for (idx, char) in enumerate(n):
			if char == '0':
				pass
			else:
				nor.append(idx)
		k = []
		for idx in nor:
			k.append(f"{n[idx]}{'0' * (len(n) - 1 - idx)}")
		print(len(k))
		print(' '.join(k))
main()


for _ in range(int(input())):
	num = int(input())
	a = []
	i = 1
	count = 0
	b = ''
	while num > 0:
		r = num % 10
		a.append(r * i)
		i = i * 10
		num = num // 10
	for i in range(len(a)):
		if a[i] != 0:
			count = count + 1
			b = b + str(a[i]) + ' '
	print(count)
	print(b)


import math
t = int(input())
num = [input() for x in range(t)]
for x in num:
	z = []
	for (i, y) in enumerate(x):
		if len(x) == 1:
			z.append(x)
			break
		if y != '0':
			a = int(y)
			a = a * math.pow(10, len(x) - i - 1)
			z.append(a)
		elif y == '0':
			pass
	print(len(z))
	z = list(map(int, z))
	print(*z, sep=' ')


for _ in range(int(input())):
	n = input()
	l = []
	for (i, j) in enumerate(n[::-1]):
		if j != '0':
			l.append(j + '0' * i)
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


for p in range(int(input())):
	x = int(input())
	if x <= 10:
		print(1)
		print(x)
		continue
	else:
		z = list(str(x))
		for i in range(len(z)):
			z[i] = int(z[i])
		c = 0
		ans = []
		for i in range(len(z) - 1, -1, -1):
			if z[i] != 0:
				ans.append(z[i] * pow(10, len(z) - i - 1))
	print(len(ans))
	print(*ans)


t = int(input())
for _ in range(t):
	n = int(input())
	m = list(str(n))
	m.reverse()
	x = []
	for i in range(len(m)):
		if not m[i] == '0':
			x.append(int(m[i]) * pow(10, i))
	print(len(x))
	print(*x)


def find_round_numbers(number):
	round_numbers_array = []
	numberOfDigits = len(str(number)) - 1
	while number != 0:
		round_numbers_array.append(int(number % 10))
		number = int(number / 10)
	round_numbers_array.reverse()
	round_numbers_array_with_tens = []
	for i in round_numbers_array:
		if i != 0:
			round_numbers_array_with_tens.append(i * pow(10, numberOfDigits))
		numberOfDigits -= 1
	return round_numbers_array_with_tens
number_of_test_cases = int(input())
while number_of_test_cases != 0:
	number = int(input())
	round_number_array = find_round_numbers(number)
	print(len(round_number_array))
	print(' '.join(map(str, round_number_array)))
	number_of_test_cases -= 1


for _ in range(int(input())):
	n = int(input())
	s = list(str(n))
	l = len(s)
	for i in range(l):
		s[i] = int(s[i] + '0' * (l - i - 1))
	s = [i for i in s if i]
	print(len(s))
	print(*s)


tc = int(input())
while tc > 0:
	n = int(input())
	factor = 1
	nums = []
	while n > 0:
		(q, r) = divmod(n, 10)
		if r != 0:
			nums.append(str(r * factor))
		factor *= 10
		n = q
	print(len(nums))
	print(' '.join(nums))
	tc -= 1


for _ in range(int(input())):
	n = int(input())
	a = 0
	b = []
	l = []
	for i in str(n):
		l.append(i)
	x = 0
	if n >= 1 and n <= 9:
		print(1)
		print(n)
	else:
		for i in range(len(l)):
			if l[i] != '0':
				a += 1
				b.append(l[i] + '0' * (len(l) - 1 - i))
		print(a)
		print(*b)


for i in range(int(input())):
	N = int(input())
	count = 0
	l = []
	while N // 10 != 0:
		l.append(N % 10)
		if N % 10 != 0:
			count += 1
		N = N // 10
	l.append(N)
	count += 1
	print(count)
	l.reverse()
	for j in range(len(l)):
		if l[j] != 0:
			a = l[j] * 10 ** (len(l) - j - 1)
			print(a, end=' ')
	print()


for t in range(int(input())):
	a = input()
	n = len(a)
	l = []
	for i in range(n):
		l.append(a[i] + '0' * (n - i - 1))
	cl = [x for x in l if int(x) != 0]
	print(len(cl))
	print(*cl)


t = int(input())
for i in range(t):
	n = list(map(int, input()))
	round_numbers = []
	for j in range(len(n)):
		if n[j] > 0:
			round_numbers.append(n[j] * 10 ** (len(n) - j - 1))
	print(len(round_numbers))
	print(*round_numbers)


t = int(input())
for _ in range(t):
	num = input()
	l = len(num) - 1
	r_nums = []
	for d in num:
		if d != '0':
			r_nums.append(d + '0' * l)
		l -= 1
	print(len(r_nums))
	print(*r_nums)


def main():
	for _ in range(int(input())):
		x = int(input())
		ans = []
		y = 0
		while x > 0:
			rem = x % 10
			x //= 10
			if rem != 0:
				ans.append(rem * 10 ** y)
			y += 1
		print(len(ans))
		print(*ans, sep=' ')
main()


t = int(input())
for i in range(t):
	n = int(input())
	k = len(str(n)) - 1
	count = 1
	abc = []
	for j in str(n):
		if int(j + k * '0') == 0:
			k -= 1
			continue
		abc.append(j + k * '0')
		k -= 1
	print(len(abc))
	for l in abc:
		print(l, end=' ')


t = int(input())
for _ in range(t):
	n = int(input())
	s = str(n)[::-1]
	sumi = 0
	arr = []
	for i in range(len(s) - 1, -1, -1):
		if s[i] != '0':
			x = int(s[i]) * 10 ** i
			sumi += x
			arr.append(x)
	print(len(arr))
	print(*arr)


import math
import sys
t = int(input())
for i in range(t):
	n = input()
	arr = []
	for j in range(len(n)):
		if n[j] != '0':
			s = n[j] + '0' * (len(n) - j - 1)
			arr.append(s)
	print(len(arr))
	print(*arr)


t = int(input())
for _ in range(t):
	n = input()
	n = n[::-1]
	ANS = []
	d = 1
	for x in n:
		x = int(x)
		y = x * d
		if y != 0:
			ANS.append(x * d)
		d *= 10
	print(len(ANS))
	print(*ANS)


import os
import sys
from io import BytesIO, IOBase

def solution(n):
	ll = len(str(n))
	factor = int('1' + '0' * (ll - 1))
	factors = []
	while factor > 0:
		factors.append(factor)
		factor //= 10
	ss = str(n)
	res = [int(x) * factors[i] for (i, x) in enumerate(ss) if x != '0']
	write(len(res))
	write(*res)

def main():
	for _ in range(r_int()):
		solution(r_int())
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args[:-1]:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(str(args[-1]))
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


t = int(input())
for i in range(t):
	a = []
	n = int(input())
	n = list(str(n))
	for j in range(len(n)):
		c = int(n[j]) * 10 ** (len(n) - j - 1)
		if c > 0:
			a.append(c)
	print(len(a))
	for x in a:
		print(x, end=' ')
	print()


def main():
	cases = int(input())
	for i in range(1, cases + 1):
		n = input()
		j = 10 ** (len(n) - 1)
		list_r = []
		for i in range(len(n)):
			if n[i] != '0':
				list_r.append(int(n[i]) * j)
			j //= 10
		print(str(len(list_r)))
		print(*list_r, sep=' ')
main()


t = int(input())
for i in range(t):
	n = input()
	no = n
	n = list(n)
	mul = 1
	count = 0
	zeroc = 0
	liste = []
	for j in range(len(n) - 1, -1, -1):
		if int(n[j]) != 0:
			liste.append(int(n[j]) * mul)
			mul *= 10
			count += 1
		else:
			zeroc += 1
			mul *= 10
	if zeroc == len(n) - 1:
		print('1')
		print(no)
	else:
		print(count)
		liste = liste[::-1]
		print(*liste)


n = int(input())
for i in range(n):
	m = int(input())
	a = [10000, 1000, 100, 10, 1]
	count = 0
	b = []
	for j in range(len(a)):
		c = m // a[j]
		if c > 0:
			count += 1
			b.append(str(m // a[j] * a[j]))
			m = m % a[j]
		else:
			pass
	print(count)
	dil = ' '
	print(dil.join(b))


for _ in range(int(input())):
	n = input()
	i = len(n)
	print(i - n.count('0'))
	res = []
	while n:
		if n[0] != '0':
			res.append(n[0] + '0' * (i - 1))
		i -= 1
		n = n[1:]
	print(' '.join(res))


t = int(input())
for _ in range(t):
	n = int(input())
	r = []
	c = 0
	while n > 10:
		d = n % 10
		if d != 0:
			r.append(d * 10 ** c)
		c += 1
		n //= 10
	r.append(n * 10 ** c)
	result = str(len(r)) + '\n'
	for a in r:
		result += str(a) + ' '
	print(result)


n = int(input())
for i in range(n):
	a = int(input())
	b = a
	count = 0
	temp = 1
	while a > 0:
		if a % 10 != 0:
			count += 1
		a //= 10
	print(count)
	while b != 0:
		if b % 10 != 0:
			print(b % 10 * temp, end=' ')
		b //= 10
		temp *= 10


n = int(input())
for i in range(n):
	num = int(input())
	num_ways = 0
	answers = []
	while num != 0:
		rem = num % 10
		answers.append(rem)
		if rem != 0:
			num_ways += 1
		num = num // 10
	print(num_ways)
	for j in range(1, len(answers) + 1):
		if answers[j - 1] != 0:
			print(answers[j - 1] * 10 ** (j - 1), end=' ')
	print()


a = int(input())
i = 0
while i < a:
	b = input()
	ans = []
	for z in range(1, len(b)):
		if int(b[z - 1:len(b)]) - int(b[z:len(b)]) > 0:
			ans.append(int(b[z - 1:len(b)]) - int(b[z:len(b)]))
	if int(b[len(b) - 1]) > 0:
		ans.append(int(b[len(b) - 1]))
	print(len(ans))
	print(' '.join(map(str, ans)))
	i = i + 1


t = int(input())
for i in range(t):
	a = int(input())
	l = []
	m = []
	k = 0
	for i in range(1, 6):
		x = a % 10 ** i
		a = a - x
		l.append(x)
	for i in l:
		if i != 0:
			m.append(i)
			k = k + 1
	print(len(m))
	print(*m)


import random
import math
t = int(input())
for _ in range(t):
	n = int(input())
	digit = 1
	c = 0
	l = []
	while n > 0:
		if n % 10 != 0:
			c += 1
			l.append(n % 10 * digit)
		n //= 10
		digit *= 10
	print(c)
	for i in l:
		print(i, end=' ')
	print()


n = int(input())
for i in range(n):
	t = int(input())
	if 1 <= t and t <= 9:
		print('1')
		print(t)
	else:
		p = []
		h = 1
		while t != 0 or t % 10 != 0:
			k = t % 10 ** h
			if k != 0:
				p.append(k)
			t = t - k
			h += 1
		print(len(p))
		for j in p:
			print(j, end=' ')


t = int(input())
for i in range(t):
	n = int(input())
	digit = 0
	d = 0
	f = n
	while f != 0:
		if f % 10 != 0:
			d += 1
		f = f // 10
	print(d)
	while n != 0:
		x = n % 10 * 10 ** digit
		digit += 1
		n = n // 10
		if x != 0:
			print(x, end=' ')
	print()


t = int(input())
for tt in range(t):
	n = int(input())
	lis = []
	n_str = str(n)
	for i in range(len(n_str)):
		if n_str[i] != '0':
			lis.append(n_str[i] + '0' * (len(n_str) - i - 1))
	print(len(lis))
	print(' '.join(lis))


for i in range(int(input())):
	s = input()
	a = []
	l = len(s) - 1
	for j in range(len(s)):
		if s[j] != '0':
			a.append(int(s[j]) * 10 ** (l - j))
	print(len(a))
	print(*a)


T = int(input())
for _ in range(T):
	n = int(input())
	num = n
	flag = 0
	while num > 0:
		if num % 10 != 0:
			flag += 1
		num = num // 10
	print(flag)
	s = ''
	s1 = str(n)
	t1 = len(s1)
	for i in range(t1):
		if s1[i] != '0':
			s += s1[i] + '0' * (t1 - i - 1) + ' '
	print(s)


for _ in range(int(input())):
	n = input()
	arr = list(map(str, list(n)))
	z = len(arr)
	print(z - arr.count('0'))
	for k in range(z):
		result = []
		if arr[k] != '0':
			result.append(arr[k])
			result.append(''.join(['0'] * (z - (k + 1))))
			print(''.join(result), end=' ')
	print()


for tc in range(int(input())):
	n = int(input())
	count = 0
	ans = []
	while n:
		digit = 10 ** (len(str(n)) - 1)
		ans.append(digit * (n // digit))
		count += 1
		n -= digit * (n // digit)
	print(count)
	print(*ans)


t = int(input())
for i in range(t):
	num = int(input())
	h = 10
	output = []
	while num > 0:
		d = num % h
		num = num - d
		if d > 0:
			output.append(d)
		h = h * 10
	print(len(output))
	print(*output)


def main():
	t = int(input())
	for query in range(t):
		N = input()[::-1]
		ans = []
		for (i, n) in enumerate(N):
			if n != '0':
				ans.append(int(n) * 10 ** i)
		print(len(ans))
		print(*ans)
main()


t = int(input())

def Z(a):
	for i in range(a):
		print('0', end='')
for tests in range(t):
	A = input()
	lenA = len(A)
	cnt = 0
	for i in range(lenA):
		if A[i] != '0':
			cnt += 1
	pri = 0
	print(cnt)
	for i in range(lenA):
		if A[i] != '0':
			print(A[i], end='')
			Z(lenA - i - 1)
			pri = pri + 1
			if pri != cnt:
				print(' ', end='')
			else:
				print()


def solve():
	ls = []
	n = int(input())
	if n >= 1 and n <= 10000:
		length = len(str(n))
		for i in range(0, length):
			if n % 10 > 0:
				val = n % 10 * 10 ** i
				ls.append(val)
			n = n // 10
		print(len(ls))
		print(*ls)
	return
t = int(input())
if t >= 1 and t <= 10000:
	while t:
		solve()
		t = t - 1


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys

def solve(n):
	Ans = []
	d = 1
	while n:
		if n % 10 != 0:
			Ans.append(n % 10 * d)
		n //= 10
		d *= 10
	return Ans

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		Ans = solve(n)
		sys.stdout.write(str(len(Ans)) + '\n')
		sys.stdout.write(' '.join(map(str, Ans)) + '\n')
main()


import math
import sys
import bisect
inf = 10 ** 15
mod = 10 ** 9 + 7
test = int(input())
for t in range(test):
	tmp = input()
	a = []
	i = len(tmp) - 1
	num = 10 ** i
	for c in tmp:
		if c != '0':
			a.append(int(c) * num)
		num = num // 10
	print(len(a))
	print(*a, sep=' ')


import sys
input = sys.stdin.readline
from math import log2, log, ceil

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return res

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	string = input().strip()
	n = len(string)
	ans = []
	for i in range(n):
		if string[i] != '0':
			k = string[i] + (n - i - 1) * '0'
			ans.append(k)
	print(len(ans))
	print(*ans)


inp = input
li = list
iinp = lambda : int(inp())
ent = lambda : map(int, inp().split())
lient = lambda : [int(i) for i in inp().split()]
li0 = lambda x: [0 for i in range(x)]
livalor = lambda valor, x: [valor for i in range(x)]
stent = lambda : [i for i in inp()]
filldp = lambda valor, x, y: [[valor for i in range(y)] for i in range(x)]
l = len
t = iinp()
for _ in range(t):
	n = inp()
	divisor = 10 ** (l(n) - 1)
	cont = l(n) - 1
	n = int(n)
	respuesta = []
	while n != 0:
		tmp = n // divisor * divisor
		if tmp != 0:
			respuesta.append(tmp)
		n %= divisor
		divisor = 10 ** cont
		cont -= 1
	print(l(respuesta))
	print(*respuesta)


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


def isround(n):
	k = 1
	if n[0] != '0':
		for i in range(1, len(n)):
			if n[i] != '0':
				k = 0
				break
	else:
		k = 0
	return k

def ifnotround(a):
	global count
	string = ''
	l = len(a) - 1
	for i in a:
		if i != '0':
			string += str(int(i) * pow(10, l))
			string += ' '
			count += 1
		l -= 1
	print(count)
	print(string)

def main():
	global count
	a = input()
	if isround(a) == 1:
		print('1', a, sep='\n')
	else:
		ifnotround(a)
count = 0
n = int(input())
for i in range(n):
	count = 0
	main()


t = int(input())
for _ in range(t):
	ar = []
	n = int(input())
	d = 1
	while n:
		if n % 10:
			ar.append(n % 10 * d)
		d *= 10
		n //= 10
	print(len(ar))
	for i in ar:
		print(i, end=' ')
	print('')


t = int(input())
for i in range(t):
	n = input()
	if len(n) == 1 or int(n[1:]) == 0:
		print(1)
		print(n)
	else:
		l = []
		for i in range(len(n)):
			if n[i] != '0':
				l.append(n[i] + len(n[i + 1:]) * '0')
		print(len(l))
		print(*l)


for _ in range(int(input())):
	n = input()
	l = []
	t = len(n) - 1
	count = 0
	for i in range(len(n)):
		c = 10 ** (t - i)
		if n[i] == '0':
			continue
		else:
			count = count + 1
			l.append(int(n[i]) * c)
	print(count)
	for i in range(len(l)):
		print(l[i], end=' ')


def f(n):
	arr = []
	(ans, p) = (0, 0)
	while n:
		t = n % 10
		n //= 10
		if t:
			ans += 1
			arr.append(t * 10 ** p)
		p += 1
	print(ans)
	print(*arr, end='\n')
t = int(input())
for i in range(t):
	n = int(input())
	f(n)


for _ in range(int(input())):
	n = int(input())
	s = str(n)
	l = len(s)
	cnt = 0
	for i in range(l):
		if s[i] != '0':
			cnt += 1
	print(cnt)
	for i in range(l):
		if s[i] != '0':
			print(int(s[i]) * 10 ** (l - i - 1), end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	s = str(n)
	r = 10 ** (len(s) - 1)
	A = []
	for i in range(len(s)):
		if int(s[i]) * r != 0:
			A.append(int(s[i]) * r)
		r = r // 10
	print(len(A))
	print(*A)


T = int(input())
for _ in range(T):
	S = input()
	L = len(S)
	ans = []
	for (i, s) in enumerate(S[::-1]):
		if s != '0':
			ans.append(s + '0' * i)
	print(len(ans))
	print(' '.join(ans))


n = int(input())
while n > 0:
	a = int(input())
	print(len(str(a)) - str(a).count('0'))
	s = ''
	for i in range(len(str(a))):
		if str(a)[i] != '0':
			s += str(a)[i] + '0' * (len(str(a)) - i - 1) + ' '
	print(s)
	n -= 1


for _ in range(int(input())):
	n = input()
	result = []
	for (index, digit) in enumerate(str(n)[::-1]):
		if int(digit) != 0:
			result.append(digit + '0' * index)
	print(len(result))
	for i in result[::-1]:
		print(i, end=' ')


import sys
import bisect
import heapq
from math import *
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = pow(10, 9) + 7

def inp():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def dfs(v, visited, st, new):
	new.append(st)
	visited[st] = 1
	for i in v[st]:
		if visited[i] == 0:
			dfs(v, visited, i, new)

def solve():
	s = inp()
	arr = []
	k = 1
	ans = ''
	for i in range(0, len(s)):
		if s[i] != '0':
			arr.append(int(s[i]) * 10 ** (len(s) - (i + 1)))
	print(len(arr))
	print(*arr[::-1])
testcase(int(inp()))


from collections import defaultdict as dd
from collections import Counter as ccd
from itertools import permutations as pp
from itertools import combinations as cc
from random import randint as rd
from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq as hq
from math import gcd
mod = pow(10, 9) + 7

def inp(flag=0):
	if flag == 0:
		return list(map(int, input().strip().split(' ')))
	else:
		return int(input())
t = inp(1)
while t:
	t -= 1
	n = inp(1)
	ans = []
	k = 1
	while n > 0:
		if n % 10 != 0:
			ans.append(n % 10 * k)
		k *= 10
		n = n // 10
	print(len(ans))
	print(*ans)


n = int(input())
for i in range(0, n):
	s = input()
	l = len(s)
	j = 0
	count = 0
	while j < l:
		if s[j] == '0':
			count = count + 1
		j = j + 1
	s = int(s)
	print(l - count)
	if l == 1:
		print(s)
	else:
		r = 10
		p = []
		while s != 0:
			k = s % r
			p.append(k)
			s = s // r
		le = len(p)
		p.reverse()
		g = 0
		while g < le:
			if p[g] == 0:
				pass
			elif g != le - 1:
				print(p[g] * pow(10, le - 1 - g), end=' ')
			else:
				print(p[g] * pow(10, le - 1 - g))
			g = g + 1


t = int(input())
while t != 0:
	n = int(input())
	k = 1
	c = 0
	net = []
	while n > 0:
		r = n % 10
		if r != 0:
			c += 1
			net.append(r * k)
		k *= 10
		n = int(n / 10)
	print(c)
	print(*net)
	t -= 1


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


for i in range(int(input())):
	b = input()
	a = int(b)
	le = len(b)
	l = []
	while a != 0:
		t = str(a)
		l.append(int(t[0]) * pow(10, le - 1))
		a -= int(int(t[0]) * pow(10, le - 1))
		c = str(a)
		le = len(c)
	print(len(l))
	for k in l:
		print(k, end=' ')


for _ in range(int(input())):
	n = input()
	A = []
	for i in range(len(n)):
		if n[i] == '0' and i >= 1:
			continue
		else:
			A.append(n[i] + '0' * (len(n) - 1 - i))
	print(len(A))
	print(*A)


for _ in range(int(input())):
	print()
	n = int(input())
	ncopy = n
	if n <= 10:
		print('1')
		print(n)
	else:
		times = 0
		count = 0
		while ncopy > 0:
			times += 1
			ncopy = ncopy // 10
		m = n
		for i in range(times):
			dig = n % 10
			n = n // 10
			if dig * 10 ** i:
				count += 1
		print(count)
		for i in range(times):
			dig = m % 10
			m = m // 10
			if dig * 10 ** i:
				print(dig * 10 ** i, end=' ')


t = int(input())
for _ in range(t):
	n = int(input())
	s = []
	mult = 1
	st_n = list(str(n))
	for i in range(len(st_n)):
		if st_n[i] != '0':
			s.append(int(st_n[i] + '0' * (len(st_n) - i - 1)))
	print(len(s))
	for el in s:
		print(el, end=' ')


def func(n):
	count = 0
	res = []
	div = 10
	while n // div != 0:
		if n % div == 0:
			div *= 10
			continue
		res.append(n % div)
		n = n // div * div
		div *= 10
		count += 1
	if n:
		res.append(n)
		count += 1
	print(count)
	for i in res:
		print(i, end=' ')
t = int(input())
for i in range(t):
	n = int(input())
	func(n)


t = int(input())
o = ord
for _ in range(t):
	s = input()
	t = 0
	ans = []
	for i in range(len(s) - 1, -1, -1):
		if s[i] != '0':
			ans.append(int(s[i]) * 10 ** t)
		t += 1
	print(len(ans))
	print(*ans)


def roundsum(num):
	y = len(num) - 1
	ans = ''
	for i in range(0, len(num)):
		if num[i] != '0':
			ans += num[i]
			for v in range(y):
				ans += '0'
			y -= 1
			ans += ' '
		else:
			y -= 1
	return ans
t = int(input())
for i in range(t):
	n = input()
	print(roundsum(n).count(' '))
	print(roundsum(n))


for x in range(int(input())):
	n = int(input())
	a = list(str(n))
	count = 0
	l = []
	for i in range(len(a)):
		if a[i] != '0':
			count += 1
			l.append(int(a[i]) * 10 ** (len(a) - i - 1))
	print(count)
	print(*l)


from sys import stdin

def solve():
	n = str(input())
	s = ''
	k = len(n) - 1
	c = 0
	for i in n:
		if i == '0':
			k -= 1
			continue
		c += 1
		m = int(i) * 10 ** k
		s = s + ' ' + str(m)
		k -= 1
	print(c)
	print(s.strip())
t = int(input())
for i in range(t):
	solve()


t = int(input())
for _ in range(t):
	n = input()
	ans = list()
	if len(n) > 1 and sum((int(item) for item in n[1:])) != 0:
		for i in reversed(range(len(n))):
			if n[i] != '0':
				ans.append(n[i] + '0' * (len(n) - 1 - i))
		print(len(ans))
		print(' '.join(ans))
	else:
		print(1)
		print(n)


t = int(input())
for _ in range(t):
	n = int(input())
	s = str(n)
	l = len(s)
	fv = []
	rs = s[::-1]
	pow = 0
	for i in rs:
		fv.append(int(i) * 10 ** pow)
		pow += 1
	ans = []
	for v in fv:
		if v != 0:
			ans.append(v)
	print(len(ans))
	for i in ans:
		print(i, end=' ')


n = int(input())
res = []
counts = []
for i in range(n):
	num = reversed(input())
	count = 0
	res.append([])
	for (g, j) in enumerate(num):
		if int(j) != 0:
			res[i].append(int(j) * 10 ** int(g))
			count += 1
	counts.append(count)
for i in range(len(res)):
	print(counts[i])
	print(*res[i])


for _ in range(int(input())):
	slist = []
	n = int(input())
	num = 0
	flag = False
	while n != 0:
		if n % 10 == 0:
			n = n // 10
			num += 1
			continue
		s = str(n % 10)
		slist.append(s.ljust(num + 1, '0'))
		n = n // 10
		num += 1
		flag = True
	print(len(slist))
	print(' '.join(slist))


n = int(input())
for _ in range(n):
	k = input()
	nz = 0
	r = []
	for i in range(len(k)):
		if k[i] != '0':
			nz += 1
	print(nz)
	for i in range(len(k) - 1, -1, -1):
		if k[i] != '0':
			t = k[i]
			for p in range(len(k) - i - 1):
				t += '0'
			r.append(t)
	print(*r)


def solve(n):
	answer = []
	k = str(n)
	l = len(k)
	for i in range(l - 1, -1, -1):
		if k[i] != '0':
			answer.append(int(k[i]) * 10 ** (l - i - 1))
	print(len(answer))
	for i in answer:
		print(i)
t = int(input().strip())
for _ in range(t):
	n = int(input().strip())
	solve(n)


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = []
	p = 1
	while n > 0:
		if n % 10 != 0:
			a.append(n % 10 * p)
		n //= 10
		p *= 10
	print(len(a))
	a.sort(reverse=True)
	print(*a)


for _ in range(int(input())):
	num = int(input())
	rounds = []
	cont = 1
	while num != 0:
		tmp = num % 10
		if tmp != 0:
			rounds.append(str(tmp * cont))
		cont *= 10
		num //= 10
	print(len(rounds))
	print(' '.join(rounds))


n = int(input())
index = 1
contador = 0
show = []
num = []
aaa = 1
for i in range(n):
	t = str(input())
	num.append(t)
for h in num:
	for j in range(len(h)):
		closest = h[j]
		closest = str(closest + '0' * (len(h) - aaa))
		if int(closest) > 0:
			contador = contador + 1
			show.append(closest)
		aaa = aaa + 1
	print(contador)
	for x in show:
		print(x, end=' ')
	print()
	show = []
	contador = 0
	aaa = 1


def ans(n):
	if len(str(n)) == 1:
		return str(n)
	elif list(set(list(str(n)[1:]))) == ['0']:
		return str(n)
	elif str(n)[0] != '0':
		return str(int(str(n)[0]) * 10 ** (len(str(n)) - 1)) + ' ' + ans(str(n)[1:])
	elif str(n)[0] == '0':
		return ans(str(n)[1:])
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(str, ans(str(n)).split()))
	print(len(l))
	print(ans(str(n)))


def getNonZeroDigits(str):
	count = 0
	for ch in str:
		if ch != '0':
			count = count + 1
	return count

def getAllRoundNumbers(str):
	l = len(str)
	for i in range(0, l):
		if str[i] != '0':
			print(int(str[i]) * pow(10, l - i - 1), end=' ')
	print()
	return
tc = int(input())
for pos in range(tc):
	str = input()
	print(getNonZeroDigits(str))
	getAllRoundNumbers(str)


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
import bisect as bi
import heapq

def I():
	return int(input())

def In():
	return map(int, input().split())

def main():
	try:
		n = list(input())
		n.reverse()
		ans = []
		t = 1
		for x in n:
			x = int(x)
			temp = x * t
			if temp != 0:
				ans.append(x * t)
			t *= 10
		print(len(ans))
		print(*ans)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


def roundNumber(n):
	temp = str(n)
	pw = 0
	count = 0
	ans = []
	for ch in temp[-1::-1]:
		if ch != '0':
			conv = int(ch)
			ans.append(conv * 10 ** pw)
			count += 1
		pw += 1
	ans.append(count)
	return ans
t = int(input())
while t > 0:
	n = int(input())
	ans = roundNumber(n)
	print(ans[-1])
	for ele in ans[-2::-1]:
		print(ele, end=' ')
	print()
	t -= 1


import sys
import math
input = sys.stdin.readline

def isRound(n):
	length = int(math.log10(n))
	if n // 10 ** length == 0:
		return True
	else:
		return False
t = int(input())
for _ in range(t):
	n = int(input().rstrip())
	if isRound(n):
		print(1)
		print(n)
	else:
		l = []
		length = int(math.log10(n))
		i = length
		for c in str(n):
			if c == '0':
				i -= 1
				continue
			l.append(int(c) * 10 ** i)
			i -= 1
		print(len(l))
		for num in l:
			print(num, end=' ')
		print('')


t = int(input())

def expanded_form(num):
	a = []
	number = num
	while number != 0:
		(number, rem) = divmod(number, 10)
		a.append(rem)
	a.reverse()
	b = []
	counter = len(a)
	for n in a:
		b.append(n * 10 ** (counter - 1))
		counter -= 1
	return b
for i in range(t):
	n = int(input())
	a = expanded_form(n)
	while 0 in a:
		a.remove(0)
	print(len(a))
	for j in a:
		print(j, end=' ')


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


t = int(input())
for _ in range(t):
	q = 1
	n = int(input())
	res = []
	while n > 0:
		if n % 10:
			res.append(n % 10 * q)
		q *= 10
		n //= 10
	print(len(res))
	print(*res)


list = []
n = int(input())
k = 0

def arr(a):
	krup = 1
	s = ''
	sch = 0
	ch = a
	while ch != 0:
		mod = ch % 10
		ch = int(ch // 10)
		if mod != 0:
			sch += 1
			s = s + str(mod * 10 ** (krup - 1)) + ' '
		krup += 1
	print(sch)
	print(s)
for k in range(n):
	ch = int(input())
	list.append(ch)
k = 0
for k in range(n):
	arr(list[k])


t = int(input())
for i in range(t):
	B = []
	n = int(input())
	A = list(map(int, str(n)))
	k = len(A) - 1
	for j in range(0, len(A)):
		ans = 0
		ans += A[j] * 10 ** k
		k -= 1
		if ans != 0:
			B.append(ans)
	print(len(B))
	print(*B)


from sys import stdin, stdout
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)


for _ in range(int(input())):
	a = list(input())
	a = a[::-1]
	l = []
	for i in range(len(a)):
		if a[i] == '0':
			continue
		l.append(int(a[i]) * 10 ** i)
	print(len(l))
	print(*l)


cases = int(input())
for case in range(cases):
	number = str(input())
	length = len(number)
	toPrint = []
	for i in range(0, length):
		char = number[i]
		if char != '0':
			digit = int(char) * 10 ** (length - i - 1)
			digit = str(digit)
			toPrint.append(digit)
	print(len(toPrint))
	print(' '.join(toPrint))


for _ in range(int(input())):
	n = input()
	check = 10 ** (len(n) - 1)
	if int(n) % check == 0:
		print(1)
		print(n)
	else:
		i = 0
		ans = 0
		for j in range(len(n)):
			if n[j] != '0':
				ans += 1
		print(ans)
		while i < len(n):
			if i == len(n) - 1 and n[i] != '0':
				power = 10 ** (len(n) - 1 - i)
				print(int(n[i]) * power)
				break
			if n[i] != '0':
				power = 10 ** (len(n) - 1 - i)
				print(int(n[i]) * power, end=' ')
			i += 1


t = int(input())
for _ in range(0, t):
	n = list(input())
	nums = []
	for i in range(1, len(n)):
		digitz = []
		if n[i] != '0':
			digitz = n[i]
			for j in range(i + 1, len(n)):
				digitz += '0'
			nums.append(digitz)
			n[i] = '0'
	nums.append(n)
	buf = ''
	print(str(len(nums)))
	for n in nums:
		for l in n:
			buf += l
		buf += ' '
	print(buf)


t = int(input())
r = []
e = []
g = []
A = []
for i in range(t):
	r = []
	g = []
	s = ' '
	n = int(input())
	o = n
	cnt = 1
	d = 10
	p = 0
	while n != n % d:
		if n % d != 0:
			cnt = cnt + 1
		r.append(int(n % d))
		p = p + 1
		n = int(n / d)
	e.append(cnt)
	r.append(n)
	for l in range(len(r)):
		g.append(r[l] * 10 ** l)
	A.append(g)
	g = []
for k in range(len(e)):
	print(end='\n')
	print(e[k], end='\n')
	for p in range(len(A[k])):
		if A[k][p] != 0:
			print(A[k][p], end=' ')


n = int(input())
l = [input() for i in range(n)]
for i in l:
	c = 1
	op = ''
	if i.count('0') == len(i) - 1:
		print(1)
		print(i, end='')
	else:
		for s in i:
			if s != '0':
				op = op + s + '0' * (len(i) - c) + ' '
			c += 1
		print(len(op.split()))
		print(op, end='')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	b = list(str(n))
	cnt = 0
	for j in b:
		if j != '0':
			cnt += 1
	print(cnt)
	x = []
	b.reverse()
	for j in range(len(b)):
		if b[j] != '0':
			x.append(b[j] + j * '0')
			b[j] = '0'
	print(*x)


for _ in range(int(input())):
	s = input()
	flag = 0
	for i in range(1, len(s)):
		if s[i] != '0':
			flag = 1
			break
	if flag == 0:
		print(1)
		print(s)
	else:
		k = []
		lenn = len(s)
		for i in range(len(s)):
			if s[i] != '0':
				x = []
				x.append(s[i])
				y = ['0'] * (lenn - i - 1)
				y = ''.join(y)
				x.append(y)
				k.append(''.join(x))
		print(len(k))
		print(*k)


import math
r1 = lambda : int(input())
rm = lambda : map(int, input().split())
rls = lambda : list(rm())
test = r1()
while test:
	test -= 1
	s = input()
	ans = []
	i = 1
	s = s[::-1]
	for i in range(len(s)):
		if s[i] != '0':
			x = s[i] + '0' * i
			ans.append(x)
	print(len(ans))
	print(*ans)


for _ in range(int(input())):
	n = int(input())
	ar = []
	while n > 0:
		ar.append(n % 10)
		n = n // 10
	for i in range(len(ar)):
		if ar[i] != 0:
			ar[i] = ar[i] * 10 ** i
	while 0 in ar:
		ar.remove(0)
	print(len(ar))
	print(*ar)


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


t = int(input())
for i in range(t):
	n = int(input())
	lis = list(map(int, str(n)))
	count = 0
	lik = []
	for j in range(len(lis)):
		if lis[j] != 0:
			lis[j] = lis[j] * 10 ** (len(lis) - (j + 1))
			lik.append(lis[j])
			count = count + 1
		else:
			pass
	print(count)
	print(*lik)


def sumOfRoundNumbers(num: int) -> None:
	summands = []
	factor = 1
	while num > 0:
		term = num % 10 * factor
		if term:
			summands.append(term)
		num = int(num / 10)
		factor *= 10
	print(len(summands))
	for summand in summands:
		print(summand, end=' ')
	print()
test_cases = int(input())
for i in range(test_cases):
	sumOfRoundNumbers(int(input()))


import math
from collections import Counter

def solve():
	n = input()
	c = n.count('0')
	l = len(n)
	if l == 1:
		print(1)
		print(int(n))
	elif l - c == 1:
		print(1)
		print(int(n))
	else:
		m = []
		for i in range(l):
			if n[i] != '0':
				m.append(i)
		print(len(m))
		for i in range(len(m)):
			v = n[m[i]]
			v1 = '0' * (l - 1 - m[i])
			v = v + v1
			print(int(v), end=' ')
		print()
for _ in range(int(input())):
	solve()


import math
a = int(input())
for i in range(0, a):
	strnum = input()
	ar = []
	temp = 1
	for i in reversed(range(len(strnum))):
		if strnum[i] != '0':
			ar.append(int(strnum[i]) * temp)
		temp = temp * 10
	print(len(ar))
	print(*ar)


t = int(input())
for i in range(t):
	n = input()
	n1 = len(n)
	a = []
	n3 = n1 - 1
	for i in range(n1):
		n4 = int(n[i]) * 10 ** n3
		if n4 != 0:
			a.append(n4)
		n3 -= 1
	print(len(a))
	for i in a:
		print(i, end=' ')
	print()


T = int(input())
for t in range(T):
	n = input()
	list = []
	for (i, l) in enumerate(reversed(n)):
		if l != '0':
			list.append(l + '0' * i)
	print(len(list))
	for i in list:
		print(i, end=' ')
	print()


import math
t = input()
lst = list()
for i in range(int(t)):
	n = input()
	lst.append(int(n))
for i in lst:
	if i > 0 and i <= 10:
		print(1)
		print(i)
	else:
		count = 0
		d = list()
		k = -1
		for j in list(str(i)):
			b = len(str(i))
			k = k + 1
			c = int(j) * math.pow(10, b - k - 1)
			if c == 0:
				continue
			d.append(int(c))
			count = count + 1
		print(count)
		for i in d:
			print(i)


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


t = int(input())
while t > 0:
	n = int(input())
	a = []
	if n % 10 ** (len(str(n)) - 1) == 0:
		print(1)
		print(n)
	else:
		while len(str(n)) > 0:
			i = len(str(n))
			if n == 0:
				break
			a.append(n // 10 ** (i - 1) * 10 ** (i - 1))
			if i == 1:
				break
			n = n % 10 ** (i - 1)
		print(len(a))
		print(' '.join(map(str, a)))
	t = t - 1


for i in range(int(input())):
	n = int(input())

	def expand(num):
		digits = str(num)
		output = []
		for (i, digit) in enumerate(digits):
			if int(digit) > 0:
				if not len(digits) - i - 1:
					output.append(digit)
				else:
					output.append(digit + str(0) * (len(digits) - i - 1))
		print(len(output))
		return ' '.join(output)
	print(expand(n))


t = int(input())
for i in range(t):
	n = input()
	counter = 0
	l_of_n = len(n)
	answer = []
	for i in n:
		if i != '0':
			answer.append(i + '0' * (l_of_n - 1))
			counter += 1
		l_of_n -= 1
	print(counter)
	print(*answer)


t = int(input())
for s in range(t):
	n = input()
	c = sum([0 if x == '0' else 1 for x in n])
	l = len(n)
	print(c)
	for (i, j) in enumerate(n):
		if j != '0':
			print(int(j) * 10 ** (l - i - 1), end=' ')
	print()


n = int(input())
numbers = []
for x in range(n):
	numbers.append(list(input()))
for i in range(len(numbers)):
	print(len(numbers[i]) - numbers[i].count('0'))
	for j in range(len(numbers[i])):
		if int(numbers[i][j]) != 0:
			print(int(numbers[i][j]) * pow(10, len(numbers[i]) - j - 1), end=' ')
	print('\n')


t = int(input())
AnsList = []
for _ in range(t):
	n = input()
	ans = []
	l = len(n)
	for i in range(l):
		if n[i] != '0':
			x = 10 ** (l - 1 - i) * int(n[i])
			ans.append(x)
	AnsList.append(ans)
for ansL in AnsList:
	print(len(ansL))
	print(' '.join(map(str, ansL)))


for _ in range(int(input())):
	n = input()
	s = []
	if len(n) == 1:
		print(len(n))
		print(n)
	else:
		for i in range(len(n)):
			if n[i] != '0':
				s.append(n[i] + '0' * (len(n) - (i + 1)))
		print(len(s))
		for i in range(len(s)):
			print(s[i], end=' ')
			if i == len(s):
				break


def solve():
	res = []
	n = int(input())
	i = 0
	while n:
		(n, k) = divmod(n, 10)
		if k:
			res.append(k * 10 ** i)
		i += 1
	print(len(res))
	print(*res)
for _ in range(int(input())):
	solve()


for _ in range(int(input())):
	N = int(input())
	I = 0
	Z = []
	while N:
		X = N % 10
		if X:
			Z += (X * 10 ** I,)
		N //= 10
		I += 1
	print(len(Z))
	print(*Z)


t = int(input())
while t:
	t -= 1
	n = int(input())
	ans = []
	x = str(n)
	pw = 1
	while n:
		r = n % 10 * pw
		if r > 0:
			ans.append(r)
		pw *= 10
		n = n // 10
	print(len(ans))
	pr = ' '.join((str(each) for each in ans))
	print(pr)


t = int(input())
for i in range(t):
	n = int(input())
	cnt = 0
	mul = 1
	nums = []
	while n > 0:
		curr = int(n % 10)
		if curr != 0:
			nums.append(curr * mul)
		n /= 10
		mul *= 10
	print(len(nums))
	ans = ''
	for elem in nums:
		ans += str(elem) + ' '
	print(ans)


import sys
input = sys.stdin.readline

def main():
	for t in range(int(input())):
		n = input()
		k = 0
		s = ''
		for i in range(len(n) - 1):
			if n[i] != '0':
				s += n[i] + (len(n) - i - 2) * '0' + ' '
				k += 1
		print(k)
		print(s)
main()


t = int(input(''))
for i in range(t):
	n = str(int(input('')))
	k = 0
	rounds = []
	for (index, digit) in enumerate(n):
		if digit != '0':
			k += 1
			rounds.append(int(digit) * 10 ** (len(n) - (index + 1)))
	print(k)
	for number in rounds:
		print(number, end=' ')
	print()


t = int(input())
for i in range(t):
	s = input()
	n0 = 0
	for ch in s:
		if ch == '0':
			n0 += 1
	print(len(s) - n0)
	for j in range(len(s)):
		if s[j] == '0':
			continue
		print(s[j] + '0' * (len(s) - j - 1), end=' ')
	print()


def round_number(n):
	length = len(n)
	print(len([i for i in range(length) if n[i] != '0']))
	for i in range(len(n)):
		if n[i] != '0':
			print(int(n[i]) * 10 ** (length - i - 1), end=' ')
	print('')
t = int(input())
for i in range(t):
	n = input()
	round_number(n)


import math

def r():
	return map(int, input().split())

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

def i():
	return int(input())

def si():
	return input()

def pYes():
	print('YES')

def pNo():
	print('NO')

def plist(l):
	print(''.join(l))
t = int(input())
for i in range(t):
	s = input()
	res = []
	t = 0
	for i in s:
		t = t + 1
		if i != '0':
			res.append(i + '0' * (len(s) - t))
	print(len(res))
	print(*res)


for _ in range(int(input())):
	n = int(input())
	if len(str(n)) <= 1:
		print(1)
		print(n)
	else:
		i = 1
		a = []
		while n > 0:
			temp = str(n)
			if len(temp[1:]) != temp[1:].count('0'):
				d = n % 10
				if d * i != 0:
					a.append(d * i)
				i *= 10
				n = n // 10
			else:
				a.append(n * i)
				break
		print(len(a))
		print(*a)


max_numbers = int(input())
nmbrs = []
reslt = []
total = 0
nmbr = 0
for x in range(max_numbers):
	nmbrs.append(input())
for x in nmbrs:
	x = int(x)
	while int(x) > 0:
		y = x % 10
		x //= 10
		if y != 0:
			reslt.append(y * 10 ** nmbr)
			total += 1
		nmbr += 1
	print(str(total))
	for x in reslt:
		print(x, end=' ')
	print('\r')
	total = 0
	nmbr = 0
	nmbrs = []
	reslt = []


for _ in range(int(input())):
	n = int(input())
	a = []
	l = len(str(n)) - 1
	for i in str(n):
		a.append(int(i) * 10 ** l)
		l = l - 1
	print([len(set(a)) - 1, len(set(a))][0 not in a])
	for i in list(set(a)):
		if i != 0:
			print(i, end=' ')


for testcase in range(int(input())):
	s = input()
	ans = []
	for (i, c) in enumerate(s):
		if c != '0':
			ans.append(int(c) * 10 ** (len(s) - 1 - i))
	print(len(ans))
	print(*ans)


from collections import Counter
from collections import defaultdict
import math
import sys
input = sys.stdin.readline
rs = lambda : input().strip()
ri = lambda : int(input())
rl = lambda : list(map(int, input().split()))
rls = lambda : list(map(str, input().split()))
from collections import deque
t = int(input())
for _ in range(0, t):
	s = input().strip()
	c = s
	f = 1
	l = []
	for i in range(0, len(s)):
		if c[i] != '0':
			l.append(int(c[i]) * pow(10, len(c) - (i + 1)))
	print(len(l))
	print(*l)


n = int(input())
for i in range(n):
	x = int(input())
	a = []
	count = 0
	while x != 0:
		if int(x % 10) != 0:
			a.append(int(x % 10) * 10 ** count)
		count += 1
		x = int(x / 10)
	print(a.__len__())
	for j in range(a.__len__()):
		print(a[j], end=' ')


for i in range(int(input())):
	nums = input()
	point = 0
	all_nums = []
	for n in range(len(nums)):
		if nums[n] != '0':
			all_nums.append(nums[n] + '0' * (len(nums) - n - 1))
			point += 1
	print(point)
	print(*all_nums)


n = int(input())
for i in range(n):
	a = input()
	c = a.count('0')
	l = len(a)
	a = int(a)
	d = l - c
	print(d)
	for j in range(d):
		a = str(a)
		if len(a) == 1:
			print(a)
			break
		else:
			l = len(a) - 1
			v = 10 ** l
			a = int(a)
			f = int(a / v)
			print(f * v)
			a = a % v


for t in range(int(input())):
	s = str(input())
	print(len(s) - s.count('0'))
	for a in range(len(s)):
		if s[a] != '0':
			print(s[a], end='')
			for i in range(len(s) - a - 1):
				print('0', end='')
			print()


import re
t = int(input())
for _ in range(t):
	n = input()
	if not re.search('[123456789]', n[1:]):
		print(1)
		print(n)
	else:
		ans = []
		c = 0
		k = len(n)
		for i in range(0, k):
			if not n[i] == '0':
				ans.append(n[i] + '0' * (k - i - 1))
				c += 1
		print(c)
		print(' '.join(ans))


for _ in range(int(input())):
	a = input()
	length = len(a)
	b = int(a)
	res = []
	res[:0] = a
	flag = False
	for i in range(len(res)):
		if i == 0:
			continue
		elif res[i] != '0':
			flag = True
			break
	count = 1
	count1 = 0
	arr = []
	if flag == True:
		i = 0
		res.reverse()
		while i < length:
			c = int(res[i])
			c = c * count
			if c > 0:
				arr.append(c)
			else:
				count1 = count1 + 1
			count = count * 10
			i = i + 1
		print(length - count1)
		print(*arr)
	else:
		print('1')
		print(b)


for _ in range(int(input())):
	s = input()
	s = list(s)
	s = s[::-1]
	ls = []
	for i in range(len(s)):
		if s[i] == '0':
			pass
		else:
			var = int(s[i]) * 10 ** i
			ls.append(var)
	print(len(ls))
	print(*ls)


for i in range(int(input())):
	a = input()
	if int(a) < 10:
		print(1)
		print(a)
	elif int(a[1:]) == 0:
		print(1)
		print(a)
	else:
		l = len(a) - 1
		k = []
		for j in a:
			if int(j) != 0:
				k.append(j + '0' * l)
			l -= 1
		print(len(k))
		print(*k)


list1 = []
for i in range(1, 11):
	list1.append(i)
arr = list1
var = 10
for i in range(0, 10):
	for j in range(0, 10):
		tmp = var * list1[j]
		arr.append(tmp)
	var = var * 10
num = int(input())
for i in range(0, num):
	final = []
	count = 0
	n = int(input())
	while n > 0:
		for i in range(0, len(arr)):
			if arr[i] > n:
				final.append(arr[i - 1])
				n = n - arr[i - 1]
				count += 1
				break
	print(count)
	print(*final)


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	c = 0
	cc = 1
	f = []
	if n <= 10:
		print('1')
		print(n)
	else:
		while n > 0:
			r = n % 10
			if r > 0:
				f.append(r * cc)
				c = c + 1
			n = n // 10
			cc = cc * 10
		print(c)
		for i in range(len(f)):
			print(f[i], end=' ')


t = int(input())
for _ in range(t):
	n = int(input())
	o_lis = []
	i = 0
	while n > 0:
		o_lis.append(n % 10 * pow(10, i))
		n = n // 10
		i += 1
	count = 0
	for o in o_lis:
		if o != 0:
			count += 1
	print(count)
	for o in o_lis:
		if o != 0:
			print(o, end=' ')
	print()


n = int(input())
ans = []
for i in range(n):
	i_ans = []
	t = str(int(input()))
	cnt_10 = 0
	check_num = len(t) - 1
	while check_num >= 0:
		if t[check_num] != '0':
			i_ans.append(int(t[check_num]) * 10 ** cnt_10)
		cnt_10 += 1
		check_num -= 1
	ans.append(i_ans)
for i in range(n):
	print(len(ans[i]))
	print(*ans[i])


num = int(input())
for i in range(num):
	rou = input()
	rrou = reversed(rou)
	res = []
	times = 0
	flag = True
	if len(rou) == 1:
		print(1)
		print(rou)
		continue
	for (ind, r) in enumerate(rrou):
		if r != '0':
			if flag:
				if ind == 0:
					res.append(r)
				else:
					res.append(r + '0' * ind)
				times += 1
			else:
				times += 1
				res.append(r + '0' * ind)
		else:
			flag = False
	print(times)
	print(' '.join(res))


for i in range(int(input())):
	n = input()
	lst = []
	for i in range(len(n)):
		s = ''
		if int(n[i]) > 0:
			s = n[i] + '0' * (len(n) - i - 1)
			lst.append(s)
	print(len(lst))
	for i in lst:
		print(i, end=' ')


T = int(input())
for t in range(T):
	n = int(input())
	q = 1
	k = 0
	if n == 0:
		print(1)
		print(0)
		continue
	m = n
	while m != 0:
		if m % 10 != 0:
			k = k + 1
		m = m // 10
	print(k)
	while n != 0:
		if n % 10 != 0:
			print(n % 10 * int(q), end=' ')
		n = n // 10
		q = q * 10
	print('')


ans = []
for _ in range(int(input())):
	anspart = []
	num = input()
	for i in range(len(num)):
		digit = int(num[i:i + 1])
		if digit != 0:
			anspart.append(str(digit * pow(10, len(num) - i - 1)))
	ans.append(anspart)
for j in ans:
	print(len(j))
	print(' '.join(j))


for _ in range(int(input())):
	n = input()
	s = len(str(n))
	ss = s
	l = []
	while s > 0:
		if int(n[s - 1]) != 0:
			l.append(n[s - 1] + '0' * (ss - s))
		s -= 1
	print(len(l))
	print(*l)


n = int(input())
for i in range(n):
	a = []
	k = y = r = 0
	s = input()
	l = len(s)
	for x in range(l):
		if s[x] > '0':
			k += 1
			y = int(s[x])
			r = y * 10 ** (l - x - 1)
			a.append(r)
	print(k)
	print(' '.join([str(j) for j in a]))


n = int(input())
for i in range(n):
	a = str(input())
	s = []
	for j in range(len(a)):
		if j == 0:
			s.append(str(int(a[j]) * 10 ** (len(a) - 1)))
		elif a[j] != '0':
			s.append(str(int(a[j]) * 10 ** (len(a) - 1 - j)))
	print(len(s))
	for h in s:
		print(h, end=' ')
	print()


for tc in range(int(input())):
	n = input().strip()
	app = ''.join(['0'] * (len(n) - 1))
	res = []
	for i in range(len(n)):
		if n[i] != '0':
			x = n[i] + app
			res.append(x)
		app = app[:-1]
	print(len(res))
	print(' '.join(res))


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


for _ in range(int(input())):
	a = input()
	(x, y) = (0, 0)
	lst = []
	if len(a) == 1:
		print('1')
		print(a)
	elif int(a[1:]) == 0:
		print('1')
		print(a)
	else:
		a = a[::-1]
		for d in a:
			i = int(d)
			if i == 0:
				x += 1
				continue
			else:
				lst.append(str(i * 10 ** x))
				x += 1
				y += 1
		print(y)
		print(' '.join(lst))


for _ in range(int(input())):
	n = input()
	ans = []
	l = len(n) - 1
	for x in n:
		s = ''
		z = ''
		if x != '0':
			z += '0' * l
			s = x + z
			ans.append(s)
		l -= 1
	print(len(ans))
	print(*ans)


t = int(input())
for _ in range(t):
	s = int(input())
	c = 0
	l = []
	s1 = 0
	i = 0
	while s >= 1:
		if s % 10 != 0:
			c += 1
			s1 = s % 10 * pow(10, i)
			l.append(int(s1))
		i += 1
		s = s // 10
	print(c)
	for i in range(len(l)):
		print(l[i], end=' ')
	print('\n')


t = int(input())
ns = []
for i in range(t):
	ns.append(input())
for i in range(t):
	num = [x for x in ns[i]]
	res = []
	count = 0
	for k in range(len(ns[i]) - 1, -1, -1):
		if num[k] != '0':
			ires = int(num[k])
			ires = ires * pow(10, len(ns[i]) - k - 1)
			res.append(str(ires))
			count += 1
	print(count)
	print(' '.join(reversed(res)))


t = int(input())
for _ in range(t):
	s = input()
	s = s[::-1]
	count = 0
	for i in s:
		if int(i) != 0:
			count += 1
	print(count)
	ln = 0
	for i in s:
		tempstr = i
		if int(i) != 0:
			for j in range(0, ln):
				tempstr += '0'
			print(tempstr, end=' ')
		ln += 1


t = int(input())
for r in range(t):
	s = input()
	v = len(s)
	lst = []
	for i in s:
		if i != '0':
			lst.append(i + '0' * (v - 1))
		v -= 1
	print(len(lst))
	print(*lst)


t = int(input())
while t > 0:
	t -= 1
	n = input()
	k = len(n) - 1
	z = n.count('0')
	print(k + 1 - z)
	for i in n:
		if i != '0':
			print(i + '0' * k, end=' ')
		k -= 1
	print()


t = int(input())
for i in range(0, t):
	n = int(input())
	if n > 0 and n < 10:
		print(1)
		print(n)
	else:
		a = []
		f = 1
		while n > 0:
			r = n % 10
			if r != 0:
				a.append(r * f)
			n = n // 10
			f = f * 10
		print(len(a))
		print(' '.join(map(str, a)))


for tt in range(int(input())):
	zahl = input().strip()
	l = len(zahl)
	dec = [zahl[i] + (l - i - 1) * '0' for i in range(l) if zahl[i] != '0']
	print(len(dec))
	print(' '.join(dec))


t = int(input())
for i in range(t):
	n = input()
	terms = []
	for (j, char) in enumerate(n):
		if char in '123456789':
			terms.append(int(char) * 10 ** (len(n) - j - 1))
	print(len(terms))
	for item in terms:
		print(str(item) + ' ', end='')
	print()


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


for _ in range(int(input())):
	s = input()
	print(len(s) - s.count('0'))
	print(*(v + '0' * (len(s) - 1 - i) for (i, v) in enumerate(s) if v != '0'))


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


import sys
x = input()
i = 0
j = 0
l_1 = []
for i in range(0, int(x), 1):
	w = 0
	print()
	m = input()
	p = len(m)
	u = p - m.count('0')
	print(p - m.count('0'))
	for j in range(0, int(p), 1):
		if m[j] != '0':
			k = j + 1
			y = m[j]
			for k in range(int(k), int(p), 1):
				y = y + '0'
			n = int(y)
			l_1.append(n)
		for w in l_1:
			print(w, end=' ')
		l_1 = []


for _ in range(int(input())):
	num = input()
	n = len(num)
	cnt = 0
	lst = []
	for i in range(n):
		if num[i] != '0':
			lst.append(int(num[i]) * 10 ** (n - i - 1))
			cnt += 1
	print(cnt)
	print(*lst)


for _ in range(int(input())):
	n = input()
	p = len(n)
	res = [int(n[i]) * 10 ** (p - i - 1) for i in range(p) if n[i] != '0']
	print(len(res))
	print(*res)


testcases = int(input())
while testcases:
	n = input()
	solution = []
	for i in range(len(n)):
		if n[i] != '0':
			sol = n[i]
			for j in range(i + 1, len(n)):
				sol += '0'
			solution.append(sol)
	print(len(solution))
	for item in solution:
		print(item, end=' ')
	print()
	testcases -= 1


for n in [*open(0)][1:]:
	a = [b + i * '0' for (i, b) in enumerate(n[-2::-1]) if '0' < b]
	print(len(a), *a)


t = int(input())
tc = []
for i in range(t):
	temp = int(input())
	tc.append(temp)
for i in tc:
	n = i
	digits = 0
	no_summands = 0
	temp = []
	op = ''
	while n != 0:
		if n % 10 == 0:
			digits += 1
			n = int(n / 10)
		else:
			temp.append(n % 10 * 10 ** digits)
			n = int(n / 10)
			digits += 1
			no_summands += 1
	print(f'{no_summands}')
	for i in temp:
		op = op + str(i) + ' '
	print(op)


t = int(input())
for _ in range(t):
	n = int(input())
	keta = []
	cnt = 0
	while n != 0:
		a = n % 10
		n //= 10
		if a * 10 ** cnt != 0:
			keta.append(a * 10 ** cnt)
		cnt += 1
	print(len(keta))
	print(*keta)


def readStr():
	return input()

def readInts():
	return list(map(int, readStr().split(' ')))

def main(n):
	p = 0
	k = []
	while n > 0:
		ki = 10 ** p * (n % 10)
		if ki > 0:
			k.append(ki)
		n //= 10
		p += 1
	return k
(t,) = readInts()
for _ in range(t):
	(n,) = readInts()
	k = main(n)
	print(len(k))
	print(' '.join(map(str, k)))


Test = int(input())
for _ in range(Test):
	ip = input()
	mul = 1
	count = 0
	array = []
	for i in reversed(range(len(ip))):
		if int(ip[i]) != 0:
			res = mul * int(ip[i])
			array.append(str(res))
			count += 1
		mul = mul * 10
	print(count)
	for i in range(len(array)):
		print(int(array[i]), end=' ')


def f(s):
	count = 0
	ent = []
	n = len(s)
	for i in range(n):
		if s[i] != '0':
			count += 1
			ent += [int(s[i]) * 10 ** (n - i - 1)]
	print(count)
	for i in ent:
		print(i, end=' ')
for i in range(int(input())):
	f(input())
	print()


t = int(input())
for i in range(t):
	stack = []
	count = 0
	a = int(input())
	if a % 1000 != 0 and a > 1000:
		count += 1
		stack.append(int(a / 1000) * 1000)
		a = a % 1000
	if a % 100 != 0 and a > 100:
		count += 1
		stack.append(int(a / 100) * 100)
		a = a % 100
	if a % 10 != 0 and a > 9:
		count += 1
		stack.append(int(a / 10) * 10)
		a = a % 10
	count += 1
	stack.append(a)
	print(count, sep='\n')
	print(*stack)


for i in range(int(input())):
	x = []
	y = 0
	rs = []
	n = input()
	ln2 = len(n)
	for j in n:
		ln2 = ln2 - 1
		if j != '0':
			x.append(j)
			y = j + '0' * ln2
			rs.append(y)
	ln1 = len(x)
	print(ln1)
	print(*rs)


def solve(num):
	n = num[::-1]
	counter = 0
	c = 0
	ans = []
	for i in n:
		if i != '0':
			ans.append(int(i) * 10 ** c)
			counter += 1
		c += 1
	print(counter)
	for i in ans:
		print('{} '.format(i), end='')
	print('')
i = int(input())
for k in range(i):
	num = input()
	solve(num)


for _ in range(int(input())):
	n = int(input())
	if n <= 9:
		print('1')
		print(n)
	else:
		temp = str(n)
		temp = temp[1:]
		flag = 0
		for i in range(len(temp)):
			if temp[i] > '0':
				flag = 1
				break
		if flag == 0:
			print('1')
			print(n)
		else:
			temp = n
			res = []
			count = 0
			while temp:
				if temp % 10 == 0:
					count += 1
				res.append(temp % 10)
				temp //= 10
			prod = 1
			print(len(res) - count)
			for i in res:
				if i != 0:
					print(i * prod, end=' ')
				prod *= 10
			print('')


for _ in range(int(input())):
	Ans = []
	s = input()
	n = len(s)
	for i in range(n):
		if s[i] != '0':
			t = int(s[i])
			Ans.append(t * 10 ** (n - i - 1))
	print(len(Ans))
	for i in Ans:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	total = 0
	power = 1
	ans = []
	while n > 0:
		if n % 10 > 0:
			ans.append(str(n % 10 * power))
		n //= 10
		power *= 10
	print(len(ans))
	print(' '.join(ans))


t = int(input())
import math
for _ in range(t):
	n = int(input())
	cnt = 0
	terms = 0
	a = []
	while n > 0:
		u = n % 10
		if u != 0:
			a.append(u * 10 ** cnt)
			terms += 1
		cnt += 1
		n = int(n / 10)
	print(terms)
	print(*a, sep=' ')


for i in range(int(input())):
	n = int(input())
	cnt = 0
	digit = 0
	result = []
	while n > 0:
		if n % 10:
			cnt += 1
			result.append(n % 10 * 10 ** digit)
		n //= 10
		digit += 1
	print(cnt)
	print(' '.join(map(str, result)))


i = 0
j = 0
t = int(input())
while t:
	n = int(input())
	m = n
	while n:
		d = n % 10
		n = int(n / 10)
		if d != 0:
			j += 1
	print()
	print(j)
	j = 0
	n = m
	while n:
		d = n % 10
		n = int(n / 10)
		if d != 0:
			print(d * 10 ** i, end=' ')
		i += 1
	i = 0
	t = t - 1


for _ in range(int(input())):
	n = input()
	lis = []
	multi = len(n) - 1
	for i in n:
		if i != '0':
			lis.append(int(i) * 10 ** multi)
		multi -= 1
	print(len(lis))
	print(*lis)


for i in ' ' * int(input()):
	n = int(input())
	p = 1
	ans = []
	while n:
		x = n % 10
		if x != 0:
			ans.append(x * p)
		p *= 10
		n //= 10
	print(len(ans))
	print(*ans)


def integer(array):
	for i in range(len(array)):
		array[i] = int(array[i])
	return array
N = int(input())
inputs = []
for i in range(N):
	inputs.append(integer(str(input()).split(' ')))

def split(word):
	return [char for char in word]

def arraystring(array):
	string = ''
	for i in range(len(array) - 1):
		string += str(array[i])
		string += ' '
	string += str(array[len(array) - 1])
	return string

def round(n):
	sum = 0
	rounding = []
	d = integer(split(str(n)))
	for i in range(len(d)):
		if d[i] != 0:
			sum += 1
			rounding.append(d[i] * 10 ** (len(d) - i - 1))
	return [sum, arraystring(rounding)]
for i in inputs:
	print(round(i[0])[0])
	print(round(i[0])[1])


t = int(input())
for _ in range(t):
	n = int(input())
	rints = []
	mult = 1
	while n > 0:
		r = n % 10
		if r > 0:
			rints.append(r * mult)
		n //= 10
		mult *= 10
	print(len(rints))
	rints = reversed(rints)
	print(' '.join(list([str(x) for x in rints])))


try:
	n = int(input())
	for i in range(n):
		ele = int(input())
		if ele <= 9:
			print(1)
			print(ele)
		else:
			l = []
			s = list(str(ele))
			for j in range(len(s)):
				if int(s[j]) * 10 ** (len(s) - j - 1) != 0:
					l.append(int(s[j]) * 10 ** (len(s) - j - 1))
			print(len(l))
			for k in range(len(l)):
				print(l[k], end=' ')
except Exception as e:
	pass


for _ in range(int(input())):
	n = input()
	a = [int(x) * 10 ** i for (i, x) in enumerate(n[::-1]) if x != '0']
	print(len(a))
	print(*a)


n = int(input())
for i in range(n):
	k = int(input())
	ans = k
	razl = []
	d = 1
	t = 1
	while ans != 0:
		ost = ans % 10
		if ost != 0:
			razl.append(str(ost * d))
		ans = ans // 10
		d *= 10
	print(len(razl))
	print(' '.join(razl))


def main():
	t = int(input())
	for _ in range(t):
		d = int(input())
		ans = []
		count = 0
		while d > 0:
			if d % 10 != 0:
				ans.append(d % 10 * 10 ** count)
			count += 1
			d = d // 10
		print(len(ans))
		print(*ans)
main()


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def solve(arr):
	res = []
	for a in arr:
		n = a
		l = len(str(a))
		i = 1
		r = []
		while i < l + 1:
			t = 10 ** i
			if n % t != 0:
				r.append(n % t)
				n = n - n % t
			i += 1
		res.append(r)
	return res
n = inp()
arr = []
for i in range(n):
	arr.append(inp())
res = solve(arr)
for r in res:
	print(len(r))
	print(' '.join(map(str, r)))


tc = int(input())
for _ in range(tc):
	l = []
	n = int(input())
	c = 1
	count = 0
	x = 1
	while n > 0:
		d = n % 10
		if d != 0:
			l.append(d * c)
		c = c * 10
		n = n // 10
	print(len(l))
	print(*l)


judge = True
if judge:
	from sys import stdin, stdout
else:
	stdin = open('input.txt', 'r')
	stdout = open('output.txt', 'w')
t = int(stdin.readline())
x = [int(s) for s in stdin.readlines()]
g = []
for i in range(t):
	n = x[i]
	k = 0
	while n > 0:
		k += n % 10 != 0
		n //= 10
	stdout.write(f'{k}\n')
	n = x[i]
	m = 1
	while n > 0:
		k = n % 10
		if k != 0:
			g.append(k * m)
		m *= 10
		n //= 10
	while len(g):
		stdout.write(f'{g.pop()} ')
	stdout.write(f'\n')
stdin.close()
stdout.close()


for s in [*open(0)][1:]:
	a = [c + '0' * i for (i, c) in enumerate(s[-2::-1]) if c > '0']
	print(len(a), *a)


t = int(input())

def round(x2):
	l1 = []
	l2 = []
	for i in range(5):
		x1 = x2 % 10
		l1 = l1 + [x1]
		x2 = int(x2 / 10)
		if l1[i]:
			l2 = l2 + [l1[i] * pow(10, i)]
	result = l2
	print(len(l2))
	for i in result:
		print(i, end=' ')
	print('\n')
for i in range(t):
	n = int(input())
	round(n)


def solve(n):
	d = 1
	lis = []
	while n > 0:
		r = n % 10
		if r != 0:
			lis.append(r * d)
		d *= 10
		n //= 10
	return lis

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		lis = solve(n)
		print(len(lis))
		for x in lis:
			print(x, end=' ')
		print()
main()


numberOfTestCases = int(input())
numbers = []
for i in range(numberOfTestCases):
	numbers.append(input())
for number in numbers:
	digits = []
	for i in range(len(number)):
		digits.append(number[i])
	maxPlace = 10 ** (len(number) - 1)
	k = 0
	for digit in digits:
		if digit != '0':
			k += 1
	print(k)
	for roundnumber in digits:
		if int(roundnumber) != 0:
			print(int(roundnumber) * int(maxPlace), end=' ')
		maxPlace /= 10
	print('')


n = int(input())
l = []
for i in range(n):
	a = int(input())
	l.append(a)
for a in l:
	o = []
	i = 10
	while a > 0:
		if a % i != 0:
			o.append(a % i)
			a = a // i * i
		else:
			i = i * 10
	print(len(o))
	for i in range(len(o) - 1):
		print(o[i], end=' ')
	print(o[len(o) - 1])


for i in range(int(input())):
	a = input()
	c = len(a) - a.count('0')
	print(c)
	df = []
	k = 1
	a = a[::-1]
	for i in a:
		df.append(int(i) * k)
		k *= 10
	df = list(set(df))
	df.sort(reverse=True)
	k = len(df) - 1
	if df[-1] != 0:
		k = len(df)
	for i in range(k):
		print(df[i], end=' ')
	print()


t = int(input())
for tc in range(t):
	n = input()
	result = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		result.append(n[i] + '0' * (len(n) - 1 - i))
	print(len(result))
	print(*result)


import sys
t = int(sys.stdin.readline().strip())
for i in range(0, t):
	n = sys.stdin.readline().strip()
	l = len(n)
	ans = ''
	c = 0
	for j in range(0, l):
		if n[j] != '0':
			ans = ans + n[j] + '0' * (l - j - 1) + ' '
			c = c + 1
	print(c)
	print(ans.strip())


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


for _ in range(int(input())):
	num = input()
	num = list(map(int, num))
	count = 0
	for i in range(len(num)):
		if num[i] != 0:
			count += 1
	print(count)
	for i in range(len(num)):
		if num[i] != 0:
			print(num[i] * 10 ** (len(num) - 1 - i), end=' ')
	print('')


for i in range(int(input())):
	num = input()
	tot = 0
	to_print = ''
	for (index, digit) in enumerate(num):
		if digit != '0':
			tot += 1
			to_print += str(int(digit) * 10 ** (len(num) - 1 - index)) + ' '
	print(tot)
	print(to_print)


t = int(input())
for i in range(t):
	n = int(input())
	cnt = 0
	arr = []
	h = 0
	while n > 0:
		if n % 10 != 0:
			cnt += 1
			arr.append(n % 10 * 10 ** h)
		h += 1
		n //= 10
	print(cnt)
	for el in arr:
		print(el, end=' ')


intervals = (10000, 1000, 100, 10, 1)

def display(seconds):
	result = []
	for count in intervals:
		value = seconds // count
		if value:
			seconds -= value * count
			result.append(f'{value * count}')
	return result

def main():
	n = int(input())
	lst = []
	for i in range(n):
		lst.append(int(input()))
	for i in lst:
		answer = display(i)
		print(len(answer))
		print(' '.join(answer))
main()


t = int(input())
for i in range(t):
	n = int(input())
	p = 1
	l = []
	if n // 10 == 0:
		l.append(n)
		print(len(l))
		print(n)
		continue
	while n != 0:
		if n % 10 != 0:
			l.append(n % 10 * p)
		n = n // 10
		p *= 10
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	n = str(input())
	k = len(n)
	a = []
	for j in range(k):
		if n[j] != '0':
			a.append(n[j] + '0' * (k - j - 1))
	print(len(a))
	a.reverse()
	for j in range(len(a)):
		print(a[j], end=' ')
	print()


t = int(input())
for i in range(0, t):
	n = input()
	null = '0'
	k = len(n) - 1
	r = 1
	for j in range(1, len(n)):
		if n[j] != '0':
			r += 1
	print(r)
	for j in range(0, len(n)):
		if n[j] != '0':
			s = n[j] + k * null
			print(s, end=' ')
		k -= 1
	print('')


for _ in [0] * int(input()):
	n = int(input())
	s = '' + str(n)
	modder = 10 ** (len(s) - 1) * int(s[0])
	if modder == 0 or n % modder == 0:
		print(1)
		print(n)
	else:
		lis = []
		while n % modder != 0:
			lis.append(modder)
			n = n % modder
			s = '' + str(n)
			modder = 10 ** (len(s) - 1) * int(s[0])
		lis.append(modder)
		print(len(lis))
		print(*lis)


count = int(input())
for i in range(count):
	number = int(input())
	operations = 0
	numbers = []
	iteration = 0
	while number >= 10:
		iteration += 1
		a = number // 10
		b = number % 10
		if b != 0:
			operations += 1
			numbers.append(b * 10 ** (iteration - 1))
		number = a
	operations += 1
	numbers.append(number * 10 ** iteration)
	print(operations)
	for j in range(len(numbers)):
		print(numbers[j])


def main():
	t = int(input())
	for i in range(t):
		solve()

def solve():
	n = input()
	ln = len(n)
	m = int(n)
	k = 0
	a = []
	zero_at = []
	for i in range(ln):
		a.append(int(n[ln - i - 1]))
		if m % 10 != 0:
			k += 1
			zero_at.append(i)
		m //= 10
	print(k)
	for i in range(ln):
		if a[i] != 0:
			print(a[i], end='')
			for j in range(i):
				print(0, end='')
			print(' ')
main()


t = int(input())
answers = []
for _ in range(t):
	num = int(input())
	mult = 1
	b = []
	while num > 0:
		if num % 10 != 0:
			b.append(num % 10 * mult)
		num = num // 10
		mult = mult * 10
	answers.append(b)
for ans in answers:
	print(len(ans))
	print(*ans, sep=' ')


num = int(input())
for i in range(num):
	n = int(input())
	l = len(str(n))
	res = []
	for j in range(1, l + 1):
		p = pow(10, j)
		if n % p != 0:
			res.append(n % p)
			n -= n % p
	print(len(res))
	for r in res:
		print(str(r), end=' ')


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


t = int(input())
while t != 0:
	x = input()
	print(len(x) - x.count('0'))
	while len(x) != 0:
		if x[0] != '0':
			print(x[0] + '0' * (len(x) - 1), end=' ')
		x = x[1:]
	t -= 1


for _ in range(int(input())):
	t = input()
	s = sum((1 for d in t if d != '0'))
	print(s)
	for i in range(len(t)):
		if t[i] != '0':
			print(t[i] + '0' * (len(t) - i - 1), end=' ')
	print()


import collections

def solve(s):
	n = len(s)
	ans = []
	for i in range(n):
		if s[i] != '0':
			ans.append((n - i - 1, s[i]))
	return ans
t = int(input().strip())
for i in range(t):
	string = input().strip()
	ans = solve(string)
	print(len(ans))
	for (i, num) in ans:
		print(int(num) * 10 ** i, end=' ')
	print()


for i in range(int(input())):
	n = int(input())
	c = 1
	ans = []
	while n > 0:
		if n % 10 != 0:
			ans.append(n % 10 * c)
		c *= 10
		n //= 10
	print(len(ans))
	print(*ans, sep=' ')


for t in range(int(input())):
	N = input()[::-1]
	ans = []
	i = 0
	while i < len(N):
		if N[i] != '0':
			temp = N[i] + ''.join(['0' for j in range(i)])
			ans.append(temp)
		i += 1
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	ns = str(n)
	a = []
	i = 0
	while i < len(ns):
		if ns[i] != '0':
			x = ns[i] + (len(ns) - i - 1) * '0'
			a.append(x)
			n -= int(x)
		i += 1
	print(len(a))
	print(' '.join(a))


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

def int_in():
	return int(input())

def map_in():
	return map(int, input().split())

def list_in():
	return input().split()
t = int_in()
for _ in range(t):
	n = int_in()
	mul = 1
	l = []
	while n > 0:
		if n % 10 != 0:
			l.append(mul * (n % 10))
		n = n // 10
		mul *= 10
	print(len(l))
	print(' '.join([str(x) for x in l]))


def f(i):
	s = str(i)[::-1]
	r = []
	for i in range(len(s)):
		if int(s[i]) != 0:
			r.append(int(s[i]) * 10 ** i)
	return r
n = int(input())
for i in range(n):
	r = f(input())
	print(len(r))
	for j in r:
		print(j, end=' ')


t = int(input())
ans = list()
for i in range(0, t, 1):
	num = int(input())
	k = 0
	if num >= 1 and num <= 9:
		print(1)
		print(num)
	else:
		while True:
			r = num % 10
			j = pow(10, k) * int(r)
			if j != 0:
				ans.append(int(j))
			num /= 10
			k += 1
			if num >= 1 and num < 10:
				j = pow(10, k) * int(num)
				ans.append(int(j))
				break
	if len(ans) == 0:
		continue
	else:
		print(len(ans))
		for item in ans:
			print(item, end=' ')
	ans.clear()
	print(end='\n')


def sol():
	s = input().strip()
	l = len(s)
	multiplier = 1
	count = 0
	li = []
	for j in range(l):
		a = int(s[l - 1 - j]) * multiplier
		if a != 0 and j != l - 1:
			li.append(a)
			count += 1
		elif a != 0 and j == l - 1:
			li.append(a)
			count += 1
		multiplier *= 10
	print(count)
	for k in li:
		print(k)
for i in range(int(input())):
	sol()


t = int(input())
for _ in range(t):
	s = input()
	x = s.count('0')
	n = len(s)
	if x == n - 1:
		print(1)
		print(s)
	else:
		ls = list(s)
		i = 0
		a = []
		while i < n:
			m = s[i] + '0' * (n - i - 1)
			mn = int(m)
			if mn != 0:
				a.append(mn)
			i += 1
		print(len(a))
		for i in a:
			print(i, end=' ')
		print()


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	k = 1
	a = []
	while n > 0:
		d = n % 10
		if d != 0:
			a.append(d * k)
		k *= 10
		n //= 10
	print(len(a))
	for i in a:
		print(i, end=' ')
	print('')


for _ in range(int(input())):
	s = input()
	n = len(s)
	ans = []
	for c in s:
		if c == '0':
			n -= 1
			continue
		else:
			ans.append(10 ** (n - 1) * int(c))
			n -= 1
	print(len(ans))
	print(*ans)


import os
t = input()
for t_iter in range(int(t)):
	x = input()
	cnt = 0
	res = list()
	for i in range(len(x)):
		if int(x[len(x) - i - 1]) != 0:
			cnt += 1
			res.append(int(x[len(x) - i - 1]) * 10 ** i)
		else:
			cnt += 1
	print(len(res))
	print(' '.join([str(i) for i in res]))


for _ in range(int(input())):
	N = input()
	Zero = N.count('0')
	print(len(N) - Zero)
	N = N[::-1]
	x = 1
	List = []
	for i in range(len(N)):
		if N[i] != '0':
			List.append(int(N[i]) * x)
		x *= 10
	print(*List)


t = int(input())
for i in range(t):
	p = input()
	count = 0
	for i in range(len(p)):
		if int(p[i]) != 0:
			count += 1
	print(count)
	for i in range(len(p)):
		if int(p[i]) != 0:
			print(int(int(p[i]) * pow(10, len(p) - i - 1)), end=' ')


for i in range(int(input())):
	n = input()
	(num, l, lCount, count) = (int(n), len(n), len(n) - 1, 0)
	arr = []
	for i in range(l):
		if n[i] == '0':
			lCount -= 1
			continue
		temp = int(n[i])
		count += 1
		arr.append(temp * pow(10, lCount))
		lCount -= 1
	print(count)
	print(*arr)


try:
	k = int(input())
	finlis = []
	for i in range(k):
		num = input()
		numlis = []
		j = 0
		while j < len(num):
			if int(num[j]) != 0:
				str1 = num[j]
				for i in range(len(num) - j - 1):
					str1 += '0'
				numlis.append(int(str1))
			j += 1
		finlis.append(numlis)
	for f in finlis:
		print(len(f))
		for f1 in range(len(f)):
			if f1 != len(f) - 1:
				print(f[f1], end=' ')
			else:
				print(f[f1])
except Exception:
	pass


n = int(input())
for i in range(n):
	k = []
	p = int(input())
	if str(p)[-1] == 0:
		k.append(p)
	else:
		j = str(p)[::-1]
		for q in range(len(j)):
			if j[q] != '0':
				c = ''
				c = j[q] + '0' * q
				k.append(int(c))
	print(len(k))
	print(*k)


for __ in range(int(input())):
	n = int(input())
	s = str(n)
	k = len(s)
	a = 0
	c = k - 1
	l = []
	for i in range(k):
		if s[i] != '0':
			a = s[i]
			a = int(a)
			a = a * pow(10, c)
			l.append(a)
		c -= 1
	print(len(l))
	for i in range(len(l)):
		print(l[i], end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	ans = []
	while n:
		s = str(n)
		leng = len(s)
		t = s[0] + '0' * (leng - 1)
		t = int(t)
		n -= t
		ans.append(t)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


test = int(input())
while test:
	n = input()
	nums = [i for i in n]
	t = []
	for i in range(len(n)):
		t.append(int(nums[i]) * 10 ** (len(n) - (i + 1)))
	print(len(t) - t.count(0))
	for i in t:
		if i == 0:
			pass
		else:
			print(i, end=' ')
	print()
	test -= 1


for _ in range(int(input())):
	n = input()
	l = []
	for i in n:
		l.append(int(i))
	l.reverse()
	m = 1
	for i in range(len(l)):
		l[i] = l[i] * m
		m = m * 10
	z = []
	for i in l:
		if i != 0:
			z.append(i)
	print(len(z))
	print(*z)


t = int(input())
for i in range(t):
	n = int(input())
	s = str(n)
	l = len(s)
	a = []
	for i in range(l):
		x = int(s[i]) * 10 ** (l - 1 - i)
		a.append(x)
	z = []
	for i in range(len(a)):
		if a[i] != 0:
			z.append(a[i])
	print(len(z))
	for o in z:
		print(o, end=' ')


t = int(input())
while t:
	t -= 1
	l = []
	n = int(input())
	x = str(n)
	leng = len(x)
	l = [int(x[i]) * 10 ** (leng - (i + 1)) for i in range(leng) if x[i] != '0']
	print(len(l))
	print(' '.join(map(str, l)))


t = int(input())
for _ in range(t):
	n = int(input())
	digits = []
	res = []
	while n > 0:
		digits.append(n % 10)
		n = int(n / 10)
	multiplier = 10 ** (len(digits) - 1)
	for digit in reversed(digits):
		if digit * multiplier != 0:
			res.append(int(digit * multiplier))
		multiplier /= 10
	print(len(res))
	for val in res:
		print(val, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	a = 1
	li = []
	for _ in range(len(str(n))):
		if n % 10 != 0:
			li.append(n % 10 * a)
		n = n // 10
		a *= 10
	print(len(li))
	print(' '.join(map(str, li)))


ZERO = '0'

def generate_round_nos(n):
	return [digit + ZERO * (len(n) - place - 1) for (place, digit) in enumerate(n) if digit != ZERO]
t = int(input())
all_n = [input() for i in range(t)]
for n in all_n:
	round_nos = generate_round_nos(n)
	print(len(round_nos))
	for round_no in round_nos:
		print(round_no, end=' ')


t = int(input())
for z in range(t):
	n = int(input())
	i = 0
	s = str(n)
	c = 0
	l = [0] * len(s)
	while i < len(s):
		a = n // 10 ** i % 10
		if a != 0:
			c += 1
			l[i] = a
		i += 1
	print(c)
	for i in range(len(s)):
		if l[i] != 0:
			print(l[i] * 10 ** i, end=' ')
	print()


N = int(input())
for _ in range(N):
	n = input()
	output = []
	for (i, num) in enumerate(n):
		if num != '0':
			output.append(num + '0' * (abs(i - len(n)) - 1))
	print(len(output))
	print(' '.join(output))


T = int(input())
while T:
	num = input()
	temp = num
	num = num.replace('0', '')
	print(len(num))
	for i in range(len(temp)):
		if temp[i] != '0':
			print(int(temp[i]) * 10 ** (len(temp[i:]) - 1), end=' ')
	print()
	T -= 1


t = int(input())
for i in range(t):
	c = int(input())
	if c > 0 and c < 10:
		print(1)
		print(c)
		continue
	l = []
	p = 0
	while c > 0:
		d = c % 10
		if d != 0:
			l.append(d * 10 ** p)
		c = c // 10
		p = p + 1
	print(len(l))
	for i in l:
		print(i, end=' ')


chislo_n = int(input())
for s in range(chislo_n):
	chislo = str(input())
	nyshno = 0
	chisla = list()
	l = len(chislo)
	c = 0
	for t in chislo:
		c += 1
		if t != 0:
			x = l - c
			if x == 0:
				n = int(t)
			else:
				n = int(t) * 10 ** x
			if n != 0:
				chisla.append(n)
				nyshno += 1
	print(nyshno)
	print(*chisla)


t = int(input())
counter = 0
ah = []
for _ in range(t):
	n = int(input())
	ll = len(str(n))
	for i in range(ll):
		just = ll - i - 1
		if n // 10 ** just % 10 != 0:
			counter += 1
			ah.append(str(n // 10 ** just % 10 * 10 ** just))
	print(counter)
	x = ' '.join(ah)
	print(x)
	counter = 0
	ah.clear()


num = int(input())
for _ in range(num):
	a = input()
	l = len(a)
	list_ = []
	for i in a:
		if i == '0':
			l -= 1
			continue
		list_.append(str(int(i) * 10 ** (l - 1)))
		l -= 1
	k = len(list_)
	print(k)
	print(' '.join(list_))


n = int(input())
for i in range(n):
	liste = []
	k = 0
	l = list(input())
	lent = len(l)
	for j in range(len(l)):
		if l[j] != '0':
			k += 1
			o = str(l[j]).zfill(lent)
			o = o[::-1]
			liste.append(o)
		lent -= 1
	print(k)
	for j in range(len(liste)):
		print(liste[j], end=' ')


request = int(input())
ans1 = []
for i in range(request):
	N = input()
	ans = 0
	count = 0
	for a in N:
		a = int(a)
		k = len(N) - 1
		if a != 0:
			ans += 1
			ans1.append(a * 10 ** (k - count))
		count += 1
	print(ans)
	for a in ans1:
		print(a)
	ans1.clear()


t = int(input())
while t > 0:
	n = int(input())
	(c, x) = (0, 1)
	res = []
	while n > 0:
		if n % 10 != 0:
			res.append(n % 10 * x)
			c += 1
		n = n // 10
		x *= 10
	print(c)
	print(*res)
	t -= 1


for t in range(int(input())):
	n = int(input())
	ans = []
	p = 1
	while n > 0:
		if n % 10 != 0:
			ans += [n % 10 * p]
		n //= 10
		p *= 10
	print(len(ans))
	print(' '.join((str(v) for v in ans)))


t = int(input())
for _ in range(t):
	res = []
	k = [l for l in input()]
	if len(k) == 1:
		print(1)
		print(k[0])
		continue
	i = 0
	for el in k[::-1]:
		if el != '0':
			res.append(str(int(el) * 10 ** i))
		i += 1
	print(len(res))
	print(' '.join((x for x in res)))


t = int(input())
for i in range(t):
	n = int(input())
	st = str(n)
	count = 0
	l = []
	for j in range(len(st)):
		rem = n % 10
		if rem != 0:
			l.append(rem * 10 ** j)
			count = count + 1
		n = n // 10
	print(count)
	l2 = l[::-1]
	print(*l2)


for _ in range(int(input())):
	a = str(input())
	x = []
	count = 0
	for i in range(len(a)):
		if a[i] != '0':
			count += 1
			ro = int(a[i]) * 10 ** (len(a) - i - 1)
			x.append(ro)
	print(count)
	for j in x:
		print(j, end=' ')


n = int(input())
for i in range(n):
	x = int(input())
	a = 1
	l = list()
	c = 0
	while x > 0:
		if x % 10 * a:
			l.append(x % 10 * a)
		if x % 10 * a:
			c += 1
		x = x // 10
		a = a * 10
	print(c)
	for i in l:
		print(i, end=' ')
	print()


n = int(input())
a = []
b = []
for i in range(n):
	a1 = int(input())
	a.append(int(a1))
for i in range(n):
	if a[i] % 10 ** (len(str(a[i])) - 1) == 0 or len(str(a[i])) == 1:
		print(1)
		print(a[i])
	else:
		a1 = 0
		s = 0
		b.clear()
		for j in range(len(str(a[i]))):
			if len(str(a[i])) != j:
				a1 = a[i] % 10 ** (j + 1)
				a1 = a1 // 10 ** j * 10 ** j
				if a1 != 0:
					b.append(a1)
					s += 1
			if len(str(a[i])) == j:
				a1 = a[i] // 10 ** (len(str(a[i])) - 1)
				b.append(a1)
		print(s)
		print(*b)


t = int(input())
for tt in range(t):
	n = str(input())
	c = len(n)
	print(sum([min(1, ord(i) - ord('0')) for i in n]))
	for i in n:
		c -= 1
		if i == '0':
			continue
		print(i + '0' * c, '', end='')
	print()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = int(input())
for _ in range(t):
	n = int(input())
	a = 0
	ctr = 0
	ans = []
	while n:
		p = n % 10
		n //= 10
		if p:
			ans.append(p * 10 ** ctr)
		ctr += 1
	print(len(ans))
	print(*ans)


def solve(n):
	ans = []
	l = len(n)
	a = 1
	for i in range(l - 1, -1, -1):
		if int(n[i]) > 0:
			ans.append(str(a * int(n[i])))
		a *= 10
	return ans

def read():
	t = int(input())
	for i in range(t):
		n = input()
		ans = solve(n)
		print(len(ans))
		print(' '.join(ans))
read()


n = int(input())
for i in range(n):
	a = int(input())
	s = str(a)
	qq = len(s)
	q = ''
	for j in s:
		if j == '0':
			qq -= 1
	for j in range(len(s)):
		if s[j] != '0':
			q += s[j] + '0' * (len(s) - j - 1) + ' '
	print(qq)
	print(q)


for i in range(int(input())):
	a = int(input())
	li = []
	i = 1
	while a != 0:
		if a % 10 != 0:
			li.append(int(a % 10 * i))
		a = a // 10
		i *= 10
	print(len(li))
	print(*li)


def get_summands(n):
	multiplier = 1
	result = []
	while n > 0:
		units = n % 10
		rounded = units * multiplier
		if rounded:
			result.append(rounded)
		n = n // 10
		multiplier = multiplier * 10
	return result

def main():
	t = int(input())
	global_ans = ''
	for _ in range(t):
		n = int(input())
		ans = get_summands(n)
		r = ''
		for a in ans:
			r += str(a) + ' '
		global_ans += str(len(ans)) + '\n'
		global_ans += str(r[:-1]) + '\n'
	print(global_ans[:-1])
main()


for i1 in range(int(input())):
	n = input()
	if len(n) == 1:
		print(1)
		print(n)
		continue
	else:
		a = n[0]
		b = n[1:]
		if b == '0' * (len(n) - 1):
			print(1)
			print(n)
		else:
			x = int(n)
			c = 0
			zero = 1
			l1 = []
			while x != 0:
				y = x % 10
				if y != 0:
					c += 1
					l1.append(y * pow(10, zero - 1))
				zero += 1
				x = x // 10
			print(c)
			for i in l1:
				print(i, end=' ')
			print()


t = int(input())
for i in range(t):
	k = int(input())
	temp = k
	rounds = []
	while temp != 0:
		l = len(str(temp))
		p = 10 ** (l - 1)
		b = p * int(temp / p)
		temp = temp - b
		rounds.append(b)
	print(len(rounds))
	for j in range(len(rounds)):
		print(rounds[j], end=' ')
	print()


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


n = int(input())
for i in range(n):
	a = input()
	s = len(a)
	h = ''
	t = 0
	if s == 1:
		print(1)
		print(a)
	else:
		for i in range(len(a)):
			if a[i] != '0':
				h += a[i] + '0' * (len(a) - i - 1) + ' '
				t = t + 1
		print(t)
		print(h)


t = int(input())
a = []
for i in range(t):
	i = int(input())
	a.append(i)
for i in a:
	b = []
	k = 0
	d = 10
	for j in range(6):
		if i % d != 0:
			b.append(i % d)
			i = i - i % d
			k += 1
		d *= 10
	print(k)
	print(' '.join(map(str, b)))


def solve(t):
	s = int(t)
	ans = []
	i = 1
	while 10 ** 1 <= s:
		if s % 10 ** i != 0:
			ans.append(s % 10 ** i)
			s -= s % 10 ** i
		i += 1
	if len(ans) == 0:
		ans.append(s)
	print(len(ans))
	print(' '.join(list(map(str, ans))))
n = int(input())
for i in range(n):
	t = input()
	solve(t)


t = int(input())
for _ in range(t):
	n = input()
	print(len(list(filter(lambda x: int(x) != 0, n))))
	for i in range(len(n)):
		if n[i] != '0':
			print(n[i] + '0' * (len(n) - i - 1), end=' ')


def solver(s):
	count = 0
	l = []
	n = len(s)
	for i in range(len(s)):
		if int(s[i]) > 0:
			count += 1
			l.append(s[i] + '0' * (n - i - 1))
	print(count)
	print(*l)
t = int(input())
for i in range(t):
	s = input()
	solver(s)


def create_el(t, lll):
	el = t + ''
	for i in range(lll - 1):
		el += '0'
	return el
n = int(input())
a = list()
for i in range(n):
	a.append(input())
for tmp in a:
	if len(tmp) == 1:
		print('1')
		print(tmp)
		continue
	lll = len(tmp)
	t = list()
	for i in tmp:
		if i != '0':
			t.append(create_el(i, lll))
		lll -= 1
	print(len(t))
	for i in range(len(t)):
		print(t[i], end=' ')
	print()


import copy

def solve():
	x = int(input())
	u = 0
	f = []
	while x >= 10:
		e = copy.deepcopy(int(str(x)[0]))
		f.append(e * 10 ** (len(str(x)) - 1))
		x -= e * 10 ** (len(str(x)) - 1)
		u += 1
	if x == 0:
		print(u)
		print(' '.join([str(y) for y in f]))
	elif len(f) != 0:
		print(u + 1)
		print(' '.join([str(y) for y in f]), x)
	else:
		print(u + 1)
		print(x)

def test():
	for i in range(int(input())):
		solve()
test()


for i in range(int(input())):
	sum = 1
	a = []
	x = int(input())
	for i in range(len(str(x))):
		sum = sum * 10
		n = x % sum
		if n != 0:
			a.append(n)
		x = x - n
	print(len(a))
	s = a[::-1]
	print(' '.join([str(i) for i in s]))


n = int(input())
for _ in range(n):
	num = input()
	k = len(num)
	l = []
	for i in num:
		if i != '0':
			l.append(i.ljust(k, '0'))
		k -= 1
	print(len(l))
	print(*l)


def digits(n):
	l = []
	while n > 0:
		l.append(n % 10)
		n = n // 10
	l.reverse()
	return l
t = int(input())
for you in range(t):
	n = int(input())
	d = digits(n)
	count = 0
	for i in d:
		if i != 0:
			count += 1
	print(count)
	for i in range(len(d)):
		if d[i] != 0:
			print(d[i] * 10 ** (len(d) - i - 1), end=' ')
	print()


for t in range(int(input())):
	n = input()
	if len(n) == 1:
		print(1)
		print(n)
		continue
	cnt = 0
	arr = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		num = 10 ** (len(n) - i - 1) * int(n[i])
		arr.append(num)
		cnt += 1
	print(cnt)
	for x in arr:
		print(x, end=' ')
	print()


a = int(input())
for i in range(a):
	r = input()
	ans = []
	for i in range(len(r)):
		ans.append(r[i])
	fin = []
	for i in range(len(ans)):
		if ans[i] != '0':
			fin.append(int(ans[i]) * pow(10, len(ans) - i - 1))
	print(len(fin))
	print(*fin)


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


ncases = int(input())
n = 0
for x in range(0, ncases):
	n = int(input())
	i = 0
	valid_numbers = 0
	remainder = 0
	components = []
	while n != 0:
		i += 1
		remainder = n % 10 ** i
		if remainder != 0:
			valid_numbers += 1
			n -= remainder
			components.append(remainder)
	print(valid_numbers)
	print(*components)


for _ in range(int(input())):
	(a, b, k) = (int(input()), [], 0)
	while a > 0:
		p = a % 10
		if p != 0:
			b.append(p * 10 ** k)
		a //= 10
		k += 1
	print(len(b))
	for i in range(len(b)):
		print(b[i], end=' ')
	print()


import math
t = int(input())
for _ in range(t):
	p = list(input())
	l = len(p)
	k = []
	for i in range(l):
		if i == l - 1 and p[i] != '0':
			k.append(p[i])
		elif p[i] != '0':
			g = l - 1 - i
			u = int(math.pow(10, g))
			k.append(int(p[i]) * u)
	print(len(k))
	print(*k)


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


from sys import stdin, stdout

def main():
	t = int(stdin.readline())
	for _ in range(t):
		n = int(stdin.readline())
		c = 1
		arr = []
		while c <= n:
			x = int(n % (c * 10) / c) * c
			if x > 0:
				arr.append(x)
			c *= 10
		stdout.write(str(len(arr)) + '\n')
		stdout.write(' '.join((str(x) for x in arr)) + '\n')
main()


n = int(input())
for i in range(n):
	a = list(input())
	b = []
	for i in range(len(a)):
		c = []
		if a[i] != '0':
			c.append(str(a[i]))
			c.append('0' * (len(a) - i - 1))
			b.append(''.join(c))
	print(len(b))
	print(' '.join(b))


for _ in range(int(input())):
	n = input()
	res = []
	for i in range(len(n)):
		t = int(n[i])
		if t != 0:
			res.append(str(t * 10 ** (len(n) - 1 - i)))
	print(len(res))
	print(' '.join(res))


t = int(input())
list1 = []
for i in range(t):
	num = int(input())
	list1.append(num)
list3 = []
for i in list1:
	number = i
	list2 = list(str(number))
	count = len(list2)
	for i in list2:
		numb = int(i) * 10 ** (count - 1)
		list3.append(str(numb))
		count = count - 1
	count1 = list3.count('0')
	for i in range(count1):
		list3.remove('0')
	print(len(list3))
	x = ' '.join(list3)
	print(x)
	list3.clear()


t = int(input())
while t > 0:
	n = int(input())
	op = []
	l = len(str(n))
	for (i, w) in enumerate(str(n), 1):
		if w != '0':
			op.append(int(w + '0' * (l - i)))
	print(len(op))
	print(*op)
	t -= 1


test = int(input())
for i in range(test):
	n = int(input())
	ans = []
	c = 0
	while n:
		k = 10 ** c
		ans.append(n % 10 * k)
		c += 1
		n = n // 10
	tes = [i for i in ans if i]
	print(len(tes))
	for j in tes:
		print(j, end=' ')


for _ in range(int(input())):
	n = input()
	l = []
	for x in range(len(n)):
		if n[-x - 1] != '0':
			l.append(int(n[-x - 1]) * 10 ** x)
	print(len(l))
	print(*l)


for _ in range(int(input())):
	n = int(input())
	cnt = 1
	ans = []
	while n:
		(n, v) = divmod(n, 10)
		if v:
			ans.append(v * cnt)
		cnt *= 10
	print(len(ans))
	print(*ans)


t = int(input())
cont = 0
for i in range(t):
	vec = []
	x = str(input())
	l = len(x)
	for j in range(l):
		if x[j] != '0':
			cont = cont + 1
			vec.append(x[j] + '0' * (l - j - 1))
	print(cont)
	for j in range(cont):
		print(vec[j], end=' ')
	cont = 0
	print()


testcases = int(input())
for testcase in range(testcases):
	strs = input()
	getlen = len(strs)
	num = int(strs)
	ans = []
	cur = 1
	newstrs = strs[::-1]
	for i in range(getlen):
		if newstrs[i] != '0':
			cur *= int(newstrs[i])
			ans.append(str(cur))
		cur = pow(10, i + 1)
	newans = sorted(ans)
	print(len(newans))
	newstrs = ''
	for i in newans:
		newstrs += i
		newstrs += ' '
	print(newstrs)


t = int(input())
while t != 0:
	n = int(input())
	c = n
	a = str(c)
	b = len(a)
	m = int(a[0]) * 10 ** (b - 1)
	x = 0
	d = 0
	l = []
	while d != n:
		c = c % m
		a = str(c)
		b = len(a)
		d += m
		l.append(m)
		m = int(a[0]) * 10 ** (b - 1)
		x += 1
	print(x)
	print(*l)
	t -= 1


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	c = 0
	a = 1
	lis = []
	while n > 0:
		if n % 10 != 0:
			temp = a * (n % 10)
			a = a * 10
			n = int(n / 10)
			lis.append(temp)
			c += 1
		else:
			a = a * 10
			n = int(n / 10)
	print(c)
	for i in lis:
		print(i, end=' ')
	print()


a = int(input())
while a > 0:
	n = input()
	result = []
	for i in range(len(n)):
		temp = 10 ** (len(n) - i - 1)
		temp1 = int(n[i]) * temp
		if temp1 != 0:
			result.append(temp1)
	print(len(result))
	print(*result)
	a -= 1


T = int(input())
for t in range(T):
	N = input()
	n = int(N)
	nums = list()
	k = 0
	j = 0
	for i in range(len(N) - 1, -1, -1):
		if N[i] != '0':
			k += 1
			nums.append(int(N[i]) * 10 ** j)
		j += 1
	print(k)
	print(' '.join(list(map(str, nums))))


t = int(input())

def solve():
	n = int(input())
	res1 = len(str(n))
	res2 = []
	cnt = 0
	for j in range(res1):
		temp = n % 10 * 10 ** cnt
		if temp != 0:
			res2.append(str(temp))
		n = n // 10
		cnt += 1
	print(len(res2))
	print(*res2, sep=' ')
for i in range(t):
	solve()


t = int(input())
vals = []
answer = []
for i in range(t):
	number = input()
	if len(number) == 1:
		print('1')
		print(number)
	else:
		count = 0
		ans = []
		for i in range(len(number)):
			if number[i] != '0':
				ans.append(number[i] + '0' * (len(number) - i - 1))
			else:
				count += 1
		print(len(number) - count)
		ans.reverse()
		print(' '.join(ans))


for x in range(int(input())):
	a = input()
	list = []
	for y in range(len(a)):
		if a[y] != '0':
			list.append(a[y] + (len(a) - y - 1) * '0')
	print(len(list))
	print(*list)


t = int(input())
for _ in range(t):
	n = int(input())
	base = []
	while n != 0:
		base.append(n % 10)
		n = n // 10
	base = list(reversed(base))
	for i in range(len(base)):
		d = 10 ** (len(base) - (i + 1))
		base[i] = str(base[i] * d)
	base = list(filter(lambda x: x != '0', base))
	print(len(base))
	print(' '.join(base))


for _ in range(int(input())):
	n = int(input())
	k = 0
	a = []
	s2 = '1'
	s1 = '0'
	s = ''
	while n != 0:
		s += str(n)
		l = len(s) - 1
		if l > 0:
			a.append(str(n // int(s2 + l * s1)) + l * s1)
			k += 1
			n = n % int(s2 + l * s1)
			l -= 1
			s = ''
		else:
			a.append(n)
			k += 1
			n = 0
	print(k)
	for i in range(len(a)):
		print(a[i], end=' ')
	print(end='\n')


for _ in range(int(input())):
	n = input()
	digits = len(n) - 1
	lis = []
	n = int(n)
	for i in range(digits, -1, -1):
		s = n // pow(10, i)
		s = s * pow(10, i)
		n -= s
		if s != 0:
			lis.append(s)
	print(len(lis))
	print(*lis)


no_of_lines = int(input())
output_list = []
for j in range(no_of_lines):
	output_string = ''
	listt = list(input())
	lenth = len(listt)
	koyta = 1
	for i in range(lenth):
		if listt[i] != '0':
			if output_string != '':
				output_string = output_string + ' '
				koyta += 1
			output_string += listt[i] + '0' * (lenth - i - 1)
	output_list.append(koyta)
	output_list.append(output_string)
for i in output_list:
	print(i)


n = int(input())
rem = 0
for i in range(n):
	l = []
	m = int(input())
	for i in range(len(str(m))):
		rem = m % 10
		k = rem * pow(10, i)
		m = m // 10
		if k != 0:
			l.append(k)
	print(len(l))
	print(' '.join(map(str, l)))


for _ in range(int(input())):
	a = input()
	t = len(a)
	round = []
	for i in range(t):
		if a[i] != '0':
			round.append(a[i] + '0' * (t - 1 - i))
	print(len(round))
	print(' '.join(round))


t = int(input())
for tc in range(t):
	n = int(input())
	cnt = 1
	lst = []
	while n > 0:
		cur = n % 10 * cnt
		if cur != 0:
			lst.append(cur)
		n = n // 10
		cnt *= 10
	print(len(lst))
	for num in lst:
		print(num, end=' ')
	print()


T = int(input())
while T:
	T = T - 1
	strs = input()
	integer = int(strs)
	k = 0
	numbers = []
	N = len(strs)
	for i in range(len(strs)):
		dig = int(strs[i])
		if dig != 0:
			k = k + 1
			numbers.append(dig * 10 ** (N - i - 1))
	print(k)
	for num in numbers:
		print(num, end=' ')
	print()


n = int(input())
for _ in range(n):
	x = input()
	y = len(x)
	a = []
	count = 0
	for c in x:
		y -= 1
		if c != '0':
			a.append(int(c) * 10 ** y)
			count += 1
	print(count)
	for aa in a:
		print(aa, end=' ')
	print('')


for i in range(int(input())):
	n = input()
	count = 0
	a = []
	for j in range(len(n)):
		if n[j] != '0':
			zero = (len(n) - j - 1) * '0'
			a.append(n[j] + zero)
	print(len(a))
	print(' '.join((j for j in a)))


t = int(input())
for i in range(t):
	n = input()
	r = []
	for j in range(len(n)):
		if j == 0:
			r.append(n[j] + '0' * (len(n) - 1))
		elif n[j] != '0':
			r.append(n[j] + '0' * (len(n) - 1 - j))
	print(len(r))
	for i in range(len(r)):
		if i == len(r) - 1:
			print(r[i])
		else:
			print(r[i], end=' ')


n = int(input())
nums = []
for i in range(n):
	nums.append(input())
for k in nums:
	print(len(k) - k.count('0'), end=' ')
	for i in range(len(k)):
		if k[i] != '0':
			print(int(k[i]) * 10 ** (len(k) - 1 - i), end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	l = []
	p = 1
	if n <= 9:
		print(1)
		print(n)
	else:
		while n != 0:
			if n % 10:
				k = n % 10
				k1 = k * p
				l.append(k1)
			p *= 10
			n //= 10
		print(len(l))
		print(*l)


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


n = int(input())
for i in range(n):
	a = input()
	le = len(a)
	k = 0
	ch = le - 1
	g = []
	for j in a:
		if j != '0':
			k += 1
			g.append(str(int(j) * 10 ** ch))
		ch -= 1
	print(k)
	print(' '.join(g))


for i in range(int(input())):
	number = int(input())
	i = 1
	res = []
	while number != 0:
		digit = number % 10
		if digit != 0:
			res.append(digit * i)
		i *= 10
		number = number // 10
	print(len(res), *res)


n = int(input())
for i in range(n):
	a = int(input())
	arr = []
	slag = 0
	while a != 0:
		x = a % 10
		arr.append(x)
		a = a // 10
	for c in arr:
		if c != 0:
			slag += 1
	print(slag)
	for j in range(len(arr) - 1):
		z = arr[j] * 10 ** j
		if z == 0:
			continue
		else:
			print(z, end=' ')
	z = arr[-1] * 10 ** (len(arr) - 1)
	if z == 0:
		print()
	else:
		print(z)


import math
import atexit
import io
import sys
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())

def array_to_string(a):
	s = ''
	for i in a:
		s += str(i) + ' '
	return s[0:len(s) - 1]

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	s = str(n)
	k = 0
	a = []
	for i in range(len(s)):
		if int(s[i]) != 0:
			a.append((s[i], len(s) - 1 - i))
			k += 1
	print(k)
	for i in range(len(a)):
		print(a[i][0] + str(a[i][1] * '0'), end=' ')
	print()


import sys
t = int(input())
for i in range(t):
	n = sys.stdin.readline().strip()
	print(len(n) - n.count('0'))
	zahlen = []
	for (j, c) in enumerate(reversed(n)):
		if not c == '0':
			zahlen.append(c + j * '0')
	print(' '.join(zahlen))


n = int(input())
for i in range(n):
	m = int(input())
	t = []
	cnt = 0
	while m > 0:
		t.append(m % 10)
		m = m // 10
	l = ''
	for j in range(len(t)):
		if t[j] != 0:
			cnt += 1
			l = l + str(t[j] * 10 ** j) + ' '
	print(cnt)
	print(l)


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


t = int(input())
for _ in range(t):
	n = input()
	c = 0
	for i in range(1, len(n)):
		if n[i] != '0':
			c = c + 1
	print(c + 1)
	if c == 0:
		print(n)
	else:
		for i in range(len(n)):
			if n[i] != '0':
				print(n[i] + '0' * (len(n) - (i + 1)), end=' ')
		print()


t = int(input())
for _ in range(t):
	n = int(input())
	d = list()
	while n != 0:
		(n, digit) = divmod(n, 10)
		d.append(digit)
	count = 0
	for x in d:
		if x > 0:
			count += 1
	print(count)
	exp = 1
	for x in d:
		if x > 0:
			print(x * exp, end=' ')
		exp *= 10
	print()


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


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


from sys import stdin
input = stdin.readline
for ti in range(int(input().strip())):
	n = int(input().strip())
	ans = []
	i = 1
	while n:
		if n % 10:
			ans.append(n % 10 * i)
		n //= 10
		i *= 10
	print(len(ans))
	print(*ans)


import math
import sys
t = int(input())
while t:
	t -= 1
	n = input()
	x = [i[1] + '0' * (len(n) - i[0] - 1) for i in enumerate(n) if not i[1] == '0']
	print(len(x))
	print(*x)


from sys import setrecursionlimit
setrecursionlimit(int(1000000.0))

def find(s, sm, tb, pred):
	if s == 0:
		return 0
	if s in tb:
		return tb[s]
	tb[s] = float('inf')
	for i in range(len(sm) - 1, -1, -1):
		if sm[i] > s:
			continue
		rs = find(s - sm[i], sm, tb, pred) + 1
		if tb[s] > rs:
			tb[s] = rs
			pred[s] = sm[i]
	return tb[s]
t = int(input())
tb = {}
pred = {0: 0}
sm = []
for i in range(1, 10):
	for j in range(5):
		sm.append(i * 10 ** j)
for _ in range(t):
	s = int(input())
	find(s, sm, tb, pred)
	print(tb[s])
	o = ''
	while pred[s] > 0:
		o += str(pred[s]) + ' '
		s = s - pred[s]
	print(o)


def bai_lam(x):
	s = ''
	k = 0
	for i in range(len(str(x))):
		if not str(x)[i] == '0':
			k += 1
			s += str(x)[i] + '0' * (len(str(x)) - i - 1) + ' '
	return str(k) + '\n' + s
n = int(input())
a = []
for i in range(n):
	a.append(int(input()))
for i in a:
	print(bai_lam(i))


t = int(input())
for i in range(t):
	n = int(input())
	d = len(str(n))
	if d == 1:
		print('1')
		print(n)
	else:
		ans = []
		l = list(reversed(list(str(n))))
		for i in range(d):
			if l[i] != '0':
				ans.append(l[i].ljust(i + 1, '0'))
		print(len(ans))
		print(*ans)


t = int(input())
for i in range(t):
	a = []
	n = int(input())
	u = 1
	c = 0
	while n >= 1:
		h = n % 10
		n = int(n / 10)
		d = h * u
		u = u * 10
		if d > 0:
			c = c + 1
			a.append(d)
	print(c)
	for y in a:
		print(y)


nums = []
inps = int(input())
for i in range(inps):
	nums.append(str(input()))
sums = []
for num in nums:
	for ith_dig in range(len(num)):
		if not num[ith_dig] == '0':
			orig = num[ith_dig]
			zeros = len(num) - ith_dig - 1
			for i in range(zeros):
				orig += '0'
			sums.append(int(orig))
	print(len(sums))
	for i in sums:
		print(i, end=' ')
	sums = []
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	arr = []
	for i in range(5):
		r = n % 10
		if r > 0:
			ans += 1
		arr.append(r)
		n //= 10
	print(ans)
	for i in range(5):
		if arr[i] > 0:
			print(int(arr[i] * 10 ** i), end=' ')
	print()


for t in range(int(input())):
	n = list(input())
	l = len(n)
	ans = []
	for i in range(l - 1, -1, -1):
		if n[i] == '0':
			pass
		else:
			x = int(n[i]) * 10 ** (l - i - 1)
			ans.append(x)
	print(len(ans))
	print(*ans)


def solution():
	n = int(input())
	i = 1
	result = []
	while n > 0 and n >= 10:
		if n % 10 != 0:
			result.append(str(n % 10 * i))
		n //= 10
		i *= 10
	if n > 0:
		result.append(str(n * i))
	print(len(result))
	print(' '.join(result))
t = int(input())
for i in range(t):
	solution()


for _ in range(int(input())):
	n = input()
	print(len(n) - n.count('0'))
	n = int(n)
	for i in range(3, -1, -1):
		a = n // 10 ** i * 10 ** i
		if a != 0:
			print(a, end=' ')
		n %= 10 ** i
	print()


from collections import *
from bisect import *
from math import *
import sys
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	s = 0
	r = []
	n = str(n)
	for i in range(len(n)):
		if n[-1 - i] == '0':
			s += 1
			continue
		r.append(int(pow(10, s) * int(n[-1 - i])))
		s += 1
	print(len(r))
	print(*r)


T = int(input())
for _ in range(0, T):
	n = int(input())
	L = []
	while n > 0:
		N = str(n)
		l = len(N)
		l -= 1
		l2 = N[0]
		tt = int(l2 + '0' * l)
		L.append(tt)
		n -= tt
	print(len(L))
	print(*L)


n = int(input())
a = []
for i in range(n):
	k = int(input())
	a.append(k)
for i in a:
	c = 0
	cl = []
	el = 10
	while el <= 100000:
		if i % el != 0:
			cl.append(i % el)
			i //= el
			i *= el
			c += 1
		el *= 10
	print(c)
	ans = ''
	for j in cl:
		ans += str(j) + ' '
	ans.strip()
	print(ans)


t = int(input())
for i in range(t):
	addends = 0
	digit = 1
	L_addends = []
	a = int(input())
	while a > 0:
		if a % 10 ** digit != 0:
			L_addends.append(a % 10 ** digit)
			a -= a % 10 ** digit
			addends += 1
		digit += 1
	print(addends)
	for i in range(0, len(L_addends)):
		if i == len(L_addends) - 1:
			print(L_addends[i])
		else:
			print(L_addends[i], end=' ')


import math
T = int(input())
end_ans = []
while T > 0:
	n = input()
	end_ans.append(n)
	T -= 1
T = len(end_ans)
for i in range(T):
	ans_list = []
	n = end_ans[i]
	length = len(n)
	copy_n = int(n)
	while copy_n > 0:
		ans_list.append(copy_n % 10)
		copy_n = copy_n // 10
	cnt = 0
	for i in range(length):
		ans_list[i] = ans_list[i] * int(math.pow(10, i))
		if ans_list[i] == 0:
			cnt += 1
	for i in range(cnt):
		ans_list.remove(0)
	print(len(ans_list))
	for i in ans_list:
		print(i, end=' ')
	print()


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		S = input().strip()
		ans = []
		for (i, s) in enumerate(S[::-1]):
			if s == '0':
				continue
			ans.append(10 ** i * int(s))
		print(len(ans))
		print(*ans)
main()


import math
tests = int(input())
for test in range(tests):
	n = int(input())
	ans = []
	ans2 = []
	zeros = 0
	while n > 0:
		if n % 10 > 0:
			ans.append(n % 10)
			ans2.append(zeros)
		n = math.floor(n / 10)
		zeros += 1
	print(len(ans))
	for i in range(len(ans)):
		print(ans[i], end='')
		for j in range(ans2[i]):
			print(0, end='')
		print('')


t = int(input())
while t != 0:
	t -= 1
	ans = 0
	x = str(input())
	for i in x:
		if i != '0':
			ans += 1
	print(ans)
	y = 10 ** (len(x) - 1)
	for i in x:
		if i != '0':
			print(int(i) * y)
		y //= 10


import collections, heapq, itertools, math
groupby = itertools.groupby
rs = lambda : input()
ri = lambda : int(input())
rm = lambda : map(int, input().split())
rai = lambda : [int(x) for x in input().split()]

def solve(n):
	zero = 0
	ans = []
	N = len(str(n))
	for (i, num) in enumerate(str(n)):
		if num != '0':
			ans.append(num + '0' * (N - i - 1))
	return (len(ans), ans)
for t in range(ri()):
	n = ri()
	(a, b) = solve(n)
	print(a)
	print(*b)


t = int(input())
for i in range(t):
	f = 0
	n = int(input())
	l = []
	arr = []
	l.append(n % 10)
	n -= n % 10
	if n != 0:
		l.append(n // 10 % 10 * 10)
		n -= n // 10 % 10 * 10
		if n != 0:
			l.append(n // 100 % 10 * 100)
			n -= n // 100 % 10 * 100
			if n != 0:
				l.append(n // 1000 % 10 * 1000)
				n -= n // 1000 % 10 * 1000
				if n != 0:
					l.append(n // 10000 % 10 * 10000)
					n -= n // 10000 % 10 * 10000
	for d in range(len(l)):
		if l[d] != 0:
			arr.append(l[d])
	print(len(arr))
	print(*arr)


t = int(input())
a = [int(input()) for _ in range(t)]
for el in a:
	k = 0
	r = []
	while el > 0:
		r.append(el % 10 * 10 ** k) if el % 10 != 0 else None
		el //= 10
		k += 1
	print(len(r))
	print(*r)


for _ in range(int(input())):
	a = int(input())
	z = []
	x = str(a)
	d = len(x)
	y = [int(i) for i in x]
	for p in y:
		g = p * 10 ** (d - 1)
		if g > 0:
			z.append(g)
		d -= 1
	print(len(z))
	print(*z)


for _ in range(int(input())):
	n = input()
	l = len(n)
	if n.count('0') == len(n) - 1:
		print(1)
		print(n)
	else:
		res = []
		count = 0
		for i in range(l):
			if n[i] != '0':
				temp = n[i] + '0' * (l - i - 1)
				res.append(temp)
				count += 1
		print(count)
		print(*res)


t = int(input())
while t > 0:
	n = int(input())
	out = []
	s = 10
	while n > 0:
		r = int(n % 10)
		if r != 0:
			out.append(r * (s // 10))
		s *= 10
		n //= 10
	print(len(out))
	print(' '.join(map(str, out)))
	t -= 1


for _ in range(int(input())):
	n = list(input())
	n.reverse()
	r = 0
	res = []
	for i in range(0, len(n)):
		if n[i] != '0':
			r += 1
			res.append(n[i] + '0' * i)
	print(r)
	print(*res)


t = int(input())
n = t * [0]
l = ''
flag = 0
f = 0
for i in range(t):
	n[i] = str(int(input()))
for i in n:
	flag = 0
	l = ''
	f = len(i) - 1
	for j in i:
		if j != '0':
			flag += 1
			l += j + f * '0' + ' '
		f -= 1
	print(flag)
	print(l)


import math

def get_num():
	return list(map(int, input().rstrip().split()))

def rotate(my_list, num):
	return my_list[num:] + my_list[:num]

def main():
	num = int(input())
	for i in range(num):
		my_num = input()
		array = len(my_num) * [0]
		my_num = int(my_num)
		cont = 0
		scaler = 1
		while my_num >= 1:
			digit = math.floor(my_num % 10)
			array[cont] = digit * scaler
			cont += 1
			scaler *= 10
			my_num /= 10
		array = [vals for vals in array if vals != 0]
		print(len(array))
		print(' '.join(map(str, array)))
main()


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


for i in range(int(input())):
	n = int(input())
	a = n
	if n <= 9:
		print(1)
		print(n)
	else:
		l = []
		c = 0
		while n > 0:
			r = n % 10
			r = r * 10 ** c
			l.append(r)
			n = n // 10
			c += 1
		p = 0
		for i in l:
			if i != 0:
				p += 1
		print(p)
		for i in l:
			if i != 0:
				print(i, end=' ')
		print('')


t = int(input())
li = []
c = []
for i in range(t):
	n = input()
	li1 = []
	for i in range(len(n)):
		if int(n[i] + '0' * (len(n) - 1 - i)) != 0:
			li1.append(n[i] + '0' * (len(n) - 1 - i))
	li.append(li1)
	c.append(len(li1))
for i in range(len(c)):
	print(c[i])
	print(' '.join(list(map(str, li[i]))))


def main():
	t = int(input())
	while t > 0:
		n = int(input())
		l = []
		while n != 0:
			l.append(n % 10)
			n = n // 10
		l.reverse()
		count = 0
		res = []
		for (i, x) in enumerate(l):
			if x != 0:
				count += 1
				res.append(x * 10 ** (len(l) - i - 1))
		print(count)
		for x in res:
			print(x, end=' ')
		print()
		t -= 1
main()


t = int(input())
list1 = []
list2 = []
for test_case in range(t):
	n = input()
	if len(n) == 1:
		if n[-1] != 0:
			list1.append(int(n[-1]))
	if len(n) == 2:
		if n[-1] != 0:
			list1.append(int(n[-1]))
		if n[-2] != 0:
			list1.append(int(n[-2]) * 10)
	if len(n) == 3:
		if n[-1] != 0:
			list1.append(int(n[-1]))
		if n[-2] != 0:
			list1.append(int(n[-2]) * 10)
		if n[-3] != 0:
			list1.append(int(n[-3]) * 100)
	if len(n) == 4:
		if n[-1] != 0:
			list1.append(int(n[-1]))
		if n[-2] != 0:
			list1.append(int(n[-2]) * 10)
		if n[-3] != 0:
			list1.append(int(n[-3]) * 100)
		if n[-4] != 0:
			list1.append(int(n[-4]) * 1000)
	if len(n) == 5:
		if n[-1] != 0:
			list1.append(int(n[-1]))
		if n[-2] != 0:
			list1.append(int(n[-2]) * 10)
		if n[-3] != 0:
			list1.append(int(n[-3]) * 100)
		if n[-4] != 0:
			list1.append(int(n[-4]) * 1000)
		if n[-5] != 0:
			list1.append(int(n[-5]) * 10000)
	for items1 in list1:
		if items1 != 0:
			list2.append(items1)
	print(len(list2))
	print(' '.join((str(items2) for items2 in list2)))
	list1.clear()
	list2.clear()


import io
import os
from collections import Counter, defaultdict, deque

def solve(N):
	arr = []
	p = 1
	while N:
		(N, r) = divmod(N, 10)
		arr.append(r * p)
		p *= 10
	arr = [str(x) for x in arr if x != 0]
	return str(len(arr)) + '\n' + ' '.join(arr)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(N,) = [int(x) for x in input().split()]
	ans = solve(N)
	print(ans)


def driver():
	t = int(input())
	for i in range(t):
		(l, j) = solution()
		print(j)
		for k in l:
			print(k, end=' ')
		print()

def solution():
	n = int(input())
	i = 1
	l = []
	j = 0
	while n > 0:
		d = n % 10
		n //= 10
		if d != 0:
			j += 1
			l += [d * i]
		i *= 10
	return (l, j)
driver()


testcase = int(input())
for i in range(testcase):
	str = input()
	l = len(str)
	tl = l
	li = []
	count = 0
	for j in range(l):
		if str[j] != '0':
			count += 1
			d = int(str[j])
			d = pow(10, tl - 1) * d
			li.append(d)
			tl -= 1
		else:
			tl -= 1
	print(count)
	print(*li, sep=' ')


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
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 map(int, data().split())

def ssp():
	return 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)


import math
import sys
t = int(input())
for _ in range(t):
	a = input()
	s = []
	for i in range(len(a)):
		if a[i] != '0':
			ans = a[i]
			for j in range(i + 1, len(a)):
				ans += '0'
			s.append(ans)
	print(len(s))
	for x in s:
		print(x, end=' ')
	print()


n = int(input())
l = []
for i in range(n):
	l.append(input())
for i in l:
	if int(i) < 10:
		print(1)
		print(i)
	else:
		a = len(str(i))
		l2 = []
		cnt = 0
		j = i
		while a > 0:
			n1 = pow(10, a - 1)
			if int(j) % n1 == 0:
				cnt += 1
				l2.append(j)
				break
			else:
				m = int(j) % n1
				n = int(j) - m
				l2.append(n)
				cnt += 1
				j = m
				if j > 0:
					a = len(str(j))
				else:
					a = 0
		print(cnt)
		print(*l2)


t = int(input())
list = []
for i in range(t):
	n = int(input())
	list.clear()
	x = 0
	i = 10
	while i < n:
		if n % i != 0:
			x += 1
			list.append(n % i)
			n -= n % i
		i *= 10
	print(x + 1)
	for i in list:
		print(i, end=' ')
	print(n)


t = int(input())
while t > 0:
	n = int(input())
	a = []
	p = 10
	while n > 0:
		if n % p != 0:
			a.append(n % p)
			n -= n % p
		p *= 10
	print(len(a))
	for x in a:
		print(x, end=' ')
	print()
	t -= 1


t = int(input())
while t > 0:
	s = input()
	c = str.count
	a = c(s, '0')
	print(len(s) - a)
	nn = list()
	for i in range(len(s)):
		if s[i] != '0':
			ss = ''
			ss += s[i]
			for j in range(i + 1, len(s)):
				ss += '0'
			nn.append(ss)
	print(' '.join(nn))
	t = t - 1


for _ in range(int(input())):
	x = int(input())
	ans = []
	d = 1
	while x > 0:
		if x % 10:
			ans += [x % 10 * d]
		d *= 10
		x //= 10
	print(len(ans))
	print(*ans)


def answer(n):
	k = []
	x = 10
	while n > 0:
		t = n % x
		n -= t
		x *= 10
		k.append(t)
	k = [i for i in k if i != 0]
	print(len(k))
	print(*k)
t = int(input())
for i in range(t):
	n = int(input())
	answer(n)


import math
t = int(input())
for _ in range(0, t):
	n = input()
	lst = []
	for i in range(len(n) - 1, -1, -1):
		if n[i] != '0':
			lst.append(n[i] + '0' * (len(n) - 1 - i))
	print(len(lst))
	for i in range(0, len(lst)):
		print(lst[i], end=' ')
	print()


a = int(input())
for i in range(a):
	numbers = input()
	list = []
	for j in range(len(numbers)):
		if numbers[j] != '0':
			number = numbers[j] + '0' * (len(numbers) - j - 1)
			list.append(number)
	print(len(list))
	print(' '.join(list))


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


for t in range(int(input())):
	n = input()
	res = list()
	for i in range(len(n)):
		if n[i] == '0':
			continue
		res.append(str(n[i] + abs(len(n) - i - 1) * '0'))
	print(len(res))
	print(*res)


n = int(input())
for i in range(n):
	s = input()
	k = len(s)
	z = []
	for j in range(k):
		if s[j] != '0':
			z.append(s[j] + '0' * (k - j - 1))
	print(len(z))
	print(*z)


n = int(input())
for i in range(n):
	l1 = []
	x = int(input())
	l = len(str(x)) - 1
	for item in str(x):
		p = int(item) * 10 ** l
		if p != 0:
			l1.append(p)
		l -= 1
	print(len(l1))
	for item in l1:
		print(item, end=' ')


t = int(input())
for _ in range(t):
	n = int(input())
	l = len(str(n))
	a = []
	x = 10
	if l != 1:
		for i in range(l):
			y = int(n % x) - int(n % (x / 10))
			x *= 10
			if y != 0:
				a.append(y)
		print(len(a))
		a = str(a)[1:-1]
		print(a.replace(',', ''))
	else:
		print('1')
		print(n)


n = int(input())
while n:
	z = int(input())
	s = str(z)
	l = len(s)
	k = []
	m = 0
	for i in range(l):
		r = int(z % 10)
		y = pow(10, m)
		o = int(r * y)
		m = m + 1
		z = int(z / 10)
		if o != 0:
			k.append(o)
	print(len(k))
	for i in range(len(k)):
		print(k[i], end=' ')
	print()
	n -= 1


n = input()
n = int(n)
arr = [input() for i in range(n)]
for el in arr:
	testel = str(el)
	m = len(testel)
	thisans = [str(int(testel[m - 1 - i]) * 10 ** i) for i in range(m) if int(testel[m - 1 - i]) > 0]
	print(len(thisans))
	thisansmod = ' '.join(thisans)
	print(thisansmod)


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


for i in range(int(input())):
	a = int(input())
	a = list(str(a))
	b = len(a)
	t = []
	k = 0
	for j in range(b):
		if a[j] == '0':
			k = k + 1
	s = b - k
	print(s)
	for j in range(b):
		d = int(a[j])
		if d != 0:
			c = d * 10 ** (b - j - 1)
			t.append(c)
	print(*t)


import sys
I = sys.stdin.readline
pr = sys.stdout.write

def main():
	for _ in range(int(I())):
		n = I()
		s = list(str(n))
		l = len(s) - 1
		c = s.count('0')
		pr(f'{l - c}\n')
		for (i, x) in enumerate(s[:l]):
			if x != '0':
				pr(f'{int(x) * 10 ** (l - i - 1)} ')
		pr('\n')
main()


t = int(input())
for r in range(t):
	n = int(input())
	x = []
	p = []
	q = ''
	s = ''
	q = str(n)
	s = q[::-1]
	for i in range(len(s)):
		x.append(int(s[i]) * 10 ** i)
	for i in x:
		if i > 0:
			p.append(i)
	print(len(p))
	for i in p:
		print(i, end=' ')


for tt in range(int(input())):
	s = input()
	ans = []
	for i in range(len(s)):
		if s[i] != '0':
			temp = s[i]
			for j in range(len(s) - i - 1):
				temp += '0'
			ans.append(int(temp))
	print(len(ans))
	print(*ans)


for _ in range(int(input())):
	input_number = int(input())
	result = []
	_1000 = divmod(input_number, 1000)
	_100 = divmod(_1000[1], 100)
	_10 = divmod(_100[1], 10)
	if _1000[0] >= 1:
		result.append(_1000[0] * 1000)
	if _100[0] >= 1:
		result.append(_100[0] * 100)
	if _10[0] >= 1:
		result.append(_10[0] * 10)
	if _10[1] > 0:
		result.append(_10[1])
	print(len(result))
	print(' '.join(map(str, result)))


t = int(input())
for i in range(t):
	n = int(input())
	if n >= 1 and n <= 10:
		print(1)
		print(n)
	else:
		n = str(n)
		temp = int(n)
		l = []
		i = 1
		while temp != 0:
			r = temp % 10
			l.append(r * i)
			temp = temp // 10
			i = i * 10
		res = []
		for i in l:
			if i != 0:
				res.append(i)
		print(len(res))
		for i in res:
			print(i, end=' ')
		print()


t = int(input())
while t > 0:
	n = int(input())
	arr = []
	tn = 1
	while n > 0:
		r = n % 10
		v = r * tn
		if v > 0:
			arr.append(v)
		tn *= 10
		n //= 10
	print(len(arr))
	for i in arr:
		print(i, end=' ')
	print()
	t -= 1


a = int(input())
for i in range(0, a):
	b = input()
	d = int(b)
	b = list(b)
	c = []
	for j in range(0, len(b)):
		c.append(int(b[j]) * 10 ** (len(b) - j - 1))
	print(len(c) - c.count(0))
	for k in c:
		if k != 0:
			print(k, end=' ')
	print()


for i in range(int(input())):
	a = int(input())
	l = [int(s) for s in str(a)]
	nd = len(l) - l.count(0)
	print(nd)
	m = 1
	while a > 0:
		d = a % 10
		if d != 0:
			print(d * m, end=' ')
		m = m * 10
		a = a // 10
	print()


c = int(input())
for _ in range(c):
	i = 0
	n = int(input())
	count = 0
	dev = []
	while n > 0:
		d = n % 10
		if d != 0:
			count += 1
			dev.append(d * 10 ** i)
		n //= 10
		i += 1
	print(count)
	for i in range(count):
		print(dev[i], end=' ')
	print()


import math
for _ in range(int(input())):
	n = input()
	ans = []
	temp = 0
	for i in range(len(n) - 1, -1, -1):
		if n[i] == '0':
			temp += 1
			continue
		ans.append(n[i] + '0' * temp)
		temp += 1
	print(len(ans))
	print(' '.join(map(str, ans)))


def roundNumbers(n):
	no = []
	i = 0
	while n != 0:
		rem = n % 10 * 10 ** i
		if rem != 0:
			no.append(str(rem))
		n //= 10
		i += 1
	return (len(no), ' '.join(no))
t = int(input())
for i in range(t):
	n = int(input())
	result = roundNumbers(n)
	for j in result:
		print(j)


for i in range(int(input())):
	a = input()
	k = 0
	b = ''
	for j in range(len(a)):
		if a[j] != '0':
			k += 1
			b = b + str(int(a[j]) * 10 ** (len(a) - j - 1))
			b = b + ' '
	print(k)
	print(b)


for _ in range(int(input())):
	n = int(input())
	k = 1
	temp = list([])
	while n != 0:
		if n % 10 != 0:
			temp.append(int(n % 10) * k)
		n //= 10
		k *= 10
	print(len(temp))
	print(*temp)


for _ in range(int(input())):
	n = int(input())
	(d, l) = (1, [])
	while n:
		if n % 10:
			l.append(d * (n % 10))
		n //= 10
		d *= 10
	print(len(l))
	print(' '.join((str(x) for x in l)))


t = int(input())
for i in range(t):
	n = input()
	l = len(n)
	mn = 0
	ls = []
	if n[1:] == '0' * (l - 1):
		mn = 1
		ls.append(n)
	else:
		for x in range(l):
			r = n[l - x - 1]
			if r != '0':
				mn += 1
				ls.append(int(r) * pow(10, x))
	print(mn)
	for x in ls:
		print(x, end=' ')
	print()


a = int(input())
for _ in range(a):
	k = []
	f = 0
	b = input()
	d = len(b)
	for x in range(d):
		if b[x] != '0':
			f += 1
			k.append(b[x] + '0' * (d - x - 1))
	print(f)
	print(*k)


def sum_round(x):
	x = list(map(int, str(x)))
	len_str = len(x)
	list_tmp = []
	for (idx, i) in enumerate(x):
		if idx != len_str:
			if i == 0:
				continue
			tmp = ['0' for x in range(len_str - (idx + 1))]
			res = [str(i)] + tmp
			res = ''.join(res)
			list_tmp.append(res)
		if idx == len_str - 2:
			res = str(i)
	return list_tmp
a = int(input())
while a != 0:
	x = int(input())
	if x < 10:
		print(1)
		print(x)
		a -= 1
	elif (x % 10 == 0) & (x < 101):
		print(1)
		print(x)
		a -= 1
	else:
		x = sum_round(x)
		x = list(map(int, x))
		print(int(len(x)))
		print(*x)
		a -= 1


test = int(input())
for i in range(test):
	sum = 0
	arr = []
	n = input()
	for he in range(len(n)):
		if n[he] != '0':
			sum += 1
			arr.append(n[he] + '0' * (len(n) - 1 - he))
	print(sum)
	for hen in range(sum):
		print(arr[hen], end=' ')


t = int(input())
while t > 0:
	a = int(input())
	k = 0
	l = []
	while a > 0:
		r = a % 10 * 10 ** k
		a //= 10
		k += 1
		if r == 0:
			continue
		l.append(r)
	print(len(l))
	print(*l)
	t -= 1


a1 = int(input())
i = 0
m = 0
for x in range(a1):
	c = input()
	for k in range(len(c)):
		if k == 0 and x != 0:
			print()
		if c[i] != '0':
			m = m + 1
			i = i + 1
		else:
			i = i + 1
	i = 0
	print(m)
	c = c[::-1]
	for q in range(len(c)):
		if c[i] != '0':
			print(int(c[i]) * 10 ** i, end=' ')
		i = i + 1
	i = 0
	m = 0


n = int(input())
lst = []
while n > 0:
	lst.append(input())
	n -= 1
for i in lst:
	ln = len(i)
	if ln < 2:
		print(1)
		print(i)
		continue
	print(len(i.replace('0', '')))
	for j in range(ln - 1):
		if not i[j] == '0':
			print(int(i[j]) * 10 ** (ln - j - 1), end=' ')
	if not i[ln - 1] == '0':
		print(i[ln - 1])
	else:
		print('')


for i in range(int(input())):
	s = input()
	sum = []
	c = 0
	i = 1
	for j in s:
		if j != '0':
			sum.append(j + '0' * int(len(s) - i))
			c += 1
		i += 1
	print(c)
	for i in range(len(sum)):
		print(sum[i], end=' ')


a = int(input())
count = 0
j = []
for i in range(a):
	j.append(int(input()))
for i in range(len(j)):
	m = []
	n = j[i]
	if n % 10 != 0:
		k = n % 10
		m.append(k)
		count += 1
		n = n - k
	if n % 100 != 0:
		k = n % 100
		m.append(k)
		count += 1
		n = n - k
	if n % 1000 != 0:
		k = n % 1000
		m.append(k)
		count += 1
		n = n - k
	if n % 10000 != 0:
		k = n % 10000
		m.append(k)
		count += 1
		n = n - k
	if n % 10000 == 0 and n >= 10000:
		m.append(n)
		count += 1
	m.append(count)
	count = 0
	print(m[-1])
	print(*m[:-1])


t = int(input())
lis = []
for i in range(t):
	b = input()
	lis.append(int(b))
for i in lis:
	digits = str(i)
	num = len(digits)
	if num == 1 or digits[1:] == '0' * (num - 1):
		print('1')
		print(digits)
	else:
		c = 0
		l = []
		for k in range(num):
			if digits[k] != '0':
				c += 1
				if num - k - 1 == 0:
					l.append(str(digits[k]))
				else:
					l.append(str(digits[k]) + '0' * (num - k - 1))
		print(c)
		for j in l:
			if str(j[0]) not in digits:
				continue
			print(j, end=' ')
		print('')


import math
g = lambda x: map(x, input().split())

def main():
	n = int(input())
	while n:
		n -= 1
		a = input()[::-1]
		v = []
		for i in range(len(a)):
			if a[i] == '0':
				continue
			t = a[i]
			for j in range(i):
				t += '0'
			v.append(t)
		print(len(v))
		for i in v:
			print(i, end=' ')
		print()
main()


for _ in range(int(input())):
	n = int(input())
	N = str(n)
	c = 0
	for i in range(len(N)):
		if N[i] == '0':
			c = c + 1
	integer = len(N) - c
	print(integer)
	f = []
	if integer == 1:
		print(n)
	else:
		for i in range(len(N)):
			if N[i] == '0':
				pass
			else:
				f.append(int(N[i]) * pow(10, len(N) - i - 1))
		print(*f)


from math import *
from collections import *
from operator import itemgetter
import bisect
ii = lambda : int(input())
iia = lambda : list(map(int, input().split()))
isa = lambda : list(input().split())
I = lambda : list(map(int, input().split()))
chrIdx = lambda x: ord(x) - 96
idxChr = lambda x: chr(96 + x)
t = ii()
for _ in range(t):
	s = int(input())
	x = []
	for i in range(1, len(str(s)) + 1):
		if s % 10 ** i != 0:
			x.append(s % 10 ** i)
			s -= s % 10 ** i
	print(len(x))
	print(*x)


a = int(input())
for i in range(a):
	b = input()
	if len(b) == 1:
		print(1)
		print(b)
	else:
		f = b.replace('0', '')
		c = len(b)
		print(len(f))
		a = 10
		f = 1
		for i in range(c):
			g = int(b) % a // f * f
			if g != 0:
				print(g, end=' ')
			a = a * 10
			f = f * 10
		print()


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
t = int(readline())
for i in range(t):
	n = readline().rstrip().decode()[::-1]
	ans = []
	for (dig, nn) in enumerate(n):
		if nn != '0':
			ans.append(nn + '0' * dig)
	print(len(ans))
	print(*ans)


for i in range(int(input())):
	n = int(input())
	count = 0
	j = 0
	l = []
	while n > 0:
		if n % 10 == 0:
			j += 1
		else:
			l.append(str(n % 10) + '0' * j)
			j += 1
			count += 1
		n = n // 10
	print(count)
	print(' '.join(map(str, l)))


def d(n):
	ans = []
	i = 0
	while n > 0:
		if n % 10 != 0:
			ans.insert(0, 10 ** i * (n % 10))
		n //= 10
		i += 1
	return ans
n = int(input())
ans = []
for i in range(n):
	num = int(input())
	ans.append(d(num))
for a in ans:
	print(len(a))
	print(*a, sep=' ')


def solution(num):
	current_mult = 1
	res = []
	while num // 10 != 0:
		if num % 10 != 0:
			res.append(num % 10 * current_mult)
		current_mult *= 10
		num = num // 10
	res.append(num * current_mult)
	print(len(res))
	print(' '.join(map(str, res)))
inp = int(input())
for _ in range(inp):
	num = int(input())
	solution(num)


t = int(input())
for i in range(t):
	n = int(input())
	p = len(str(n)) - 1
	count = 0
	li = []
	while p >= 0:
		q = n // 10 ** p
		first = q * 10 ** p
		n = n % 10 ** p
		p -= 1
		if first > 0:
			count = count + 1
			li.append(first)
	print(count)
	for i in range(count):
		print(li[i], end=' ')
	print()


def ans(s):
	x = str(s)
	arr = [0] * len(x)
	if len(x) is 1:
		print(1)
		print(int(x))
	else:
		temp = len(x) - 1
		for i in range(len(x)):
			arr[i] = int(x[i]) * 10 ** temp
			temp -= 1
			pass
		count = 0
		for i in range(len(arr)):
			if arr[i] is not 0:
				count += 1
		print(count)
		for i in range(len(arr) - 1):
			if arr[i] is not 0:
				print(arr[i], end=' ')
		if arr[len(arr) - 1] is 0:
			print()
		else:
			print(arr[len(arr) - 1])
	pass
n = int(input())
for i in range(n):
	s = int(input())
	ans(s)


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


t = int(input())
for trying in range(t):
	n = list(input())
	s = len(n)
	k = []
	for i in range(s):
		if n[i] == '0':
			continue
		else:
			k.append(str(int(n[i]) * 10 ** (s - i - 1)))
	print(len(k))
	print(' '.join(k))


t = int(input())
chisla = ''
kolvo = 0
for i in range(t):
	n = input()
	for j in range(len(n)):
		if n[j] != '0':
			chisla += n[j] + '0' * (len(n) - j - 1) + ' '
			kolvo += 1
	print(kolvo)
	print(chisla[:-1])
	kolvo = 0
	chisla = ''


for _ in range(int(input())):
	n = int(input())
	if n == 10000:
		print(1)
		print(10000)
		continue
	l1 = []
	if n % 10 != 0:
		l1.append(n % 10)
		n -= n % 10
	if n % 100 != 0:
		l1.append(n % 100)
		n -= n % 100
	if n % 1000 != 0:
		l1.append(n % 1000)
		n -= n % 1000
	if n % 10000 != 0:
		l1.append(n % 10000)
		n -= n % 10000
	print(len(l1))
	for i in l1:
		print(i, end=' ')
	print('')


a = int(input())
arr = []
for i in range(a):
	arr.append(int(input()))
for i in range(a):
	t = 0
	arr2 = []
	for j in range(len(str(arr[i]))):
		if str(arr[i])[j] != '0':
			t += 1
			arr2.append(int(str(arr[i])[j]) * 10 ** (len(str(arr[i])) - j - 1))
	print(t)
	print(*arr2)


n = int(input())
for i in range(n):
	a = []
	t = int(input())
	x = [int(d) for d in str(t)]
	m = 0
	for j in range(len(x)):
		for k in range(len(a)):
			a[k] = a[k] * 10
		if x[j] != 0:
			m += 1
			a.append(x[j])
	print(m)
	for j in range(len(a)):
		print(a[j], end=' ')
	print()


for _ in range(int(input())):
	n = input()
	arr = []
	count = 0
	n = n[::-1]
	for i in range(len(n)):
		i = n[i]
		if i != '0':
			arr.append(i + '' + str('0' * count))
		count += 1
	print(len(arr))
	s = ''
	for i in range(len(arr)):
		s = s + arr[i] + ' '
	print(s)


t = int(input())
for i in range(t):
	n = int(input())
	nums = []
	count = 0
	while n > 0:
		r = n % 10 * 10 ** count
		if r != 0:
			nums.append(r)
		n = int(n / 10)
		count += 1
	print(len(nums))
	for x in nums:
		print(x, end=' ')
	print()


t = int(input())
for i in range(t):
	a = int(input())
	mult = 1
	A = []
	while a != 0:
		if a % 10 != 0:
			A.append(a % 10 * mult)
		mult *= 10
		a //= 10
	print(len(A))
	print(*A)


t = int(input())
for i in range(t):
	n = int(input())
	x = n
	ans = 0
	count = 0
	my = []
	while n != 0:
		n = n // 10
		count += 1
	while count > 0:
		if x // 10 ** (count - 1) * 10 ** (count - 1) != 0:
			ans += 1
			my.append(x // 10 ** (count - 1) * 10 ** (count - 1))
			x = x % 10 ** (count - 1)
			count -= 1
		else:
			count -= 1
	print(ans)
	for j in range(len(my)):
		if my[j] != 0 and j != len(my) - 1:
			print(my[j], end=' ')
		elif j == len(my) - 1 and my[j] != 0:
			print(my[j])


for _ in range(int(input())):
	num = int(input())
	p = 1
	ans = []
	while num:
		x = num % 10
		if x != 0:
			ans.append(x * p)
		p *= 10
		num //= 10
	print(len(ans))
	print(*ans)


n = int(input())
i = 0
while i < n:
	a = int(input())
	mas = []
	count = 0
	while a > 10:
		if a % 10 != 0:
			mas.append(a % 10 * 10 ** count)
		a //= 10
		count += 1
	if a % 10 != 0:
		mas.append(a % 10 * 10 ** count)
	if a == 10:
		mas.append(10 ** (count + 1))
	print(len(mas))
	for j in mas:
		print(j, end=' ')
	print()
	i += 1


n = int(input())
m = ''
s = 0
for i in range(n):
	s = 0
	m = ''
	n1 = int(input())
	t = str(n1)
	for j in range(len(t)):
		if t[j] != '0':
			m += t[j] + '0' * (len(t) - (j + 1)) + ' '
			s = s + 1
	print(s)
	print(m)


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


def ans(s):
	List = []
	n = len(s)
	for i in range(n):
		if s[i] != '0':
			List.append(int(s[i]) * 10 ** (n - i - 1))
	return List
t = int(input())
L = []
for i in range(t):
	L.append(ans(input()))
for l in L:
	print(len(l))
	for li in l:
		print(li, end=' ')
	print()


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	n = input()
	k = 0
	ans = []
	for i in range(len(n)):
		if n[i] != '0':
			k += 1
			ans.append(n[i] + '0' * (len(n) - i - 1))
	print(k)
	for j in ans:
		print(int(j), end=' ')
	print()


def main():
	for _ in range(int(input())):
		result = list()
		num = input()[::-1]
		for i in range(len(num)):
			r = int(num[i]) * 10 ** i
			if r:
				result.append(str(r))
		print(len(result))
		print(' '.join(result))
main()


times = int(input())
for i in range(times):
	number = int(input())
	string = str(number)
	length = len(string)
	count = 0
	lis = []
	for i in range(length):
		if not string[i] == '0':
			count += 1
			lis.append(int(string[i]) * 10 ** (length - i - 1))
	print(count)
	for item in lis:
		print(item, end=' ')
	print(' ')


from queue import LifoQueue

def print_sol(c, sol):
	print('Case #{}: {}'.format(c, sol))

def rd_int():
	return int(input())

def rd_str():
	return input()

def rd_str_lst():
	return input().split(' ')

def sp_str_lst():
	return list(input())

def rd_int_lst():
	return [int(i) for i in rd_str_lst()]

def sp_int_lst():
	return [int(i) for i in sp_str_lst()]

def dfs(g, i, v):
	v[i] = True
	for j in g[i]:
		if not v[j]:
			dfs(g, j, v)
	print(i)

def dfs_iter(g, i, n):
	v = [False] * n
	stack = LifoQueue()
	stack.put(i)
	while stack.not_empty:
		u = stack.get()
		v[u] = True
		print(u)
		for i in g[u]:
			if not v[i]:
				stack.put(i)

def main():
	t = rd_int()
	for c in range(1, t + 1):
		n = rd_str()
		c = 0
		for i in n:
			if i != '0':
				c += 1
		s = ['0'] * c
		j = 0
		d = len(n)
		for i in range(d):
			if n[i] != '0':
				s[j] = n[i] + '0' * (d - i - 1)
				j += 1
		print(c)
		print(*s)
main()


t = int(input())
for i in range(t):
	n = int(input())
	count = 0
	out = []
	j = 0
	while 1:
		length = len(str(n))
		rem = n % 10 ** (length - 1)
		if rem == 0:
			count += 1
			out.insert(j, n)
			j += 1
			break
		else:
			out.insert(j, n - rem)
			j += 1
			count += 1
			if rem <= 9:
				out.insert(j, rem)
				count += 1
				break
			n = rem
		length -= 1
	print(count)
	for k in range(len(out)):
		print(int(out[k]))


t = int(input())
for _ in range(t):
	n = int(input())
	s = str(n)
	l = 0
	ans = []
	while l <= len(s):
		rem = n % 10
		if rem != 0:
			ans.append(rem * 10 ** l)
		l += 1
		n = n // 10
	print(len(ans))
	for ele in reversed(ans):
		print(ele, end=' ')
	print()


from sys import stdin

def input():
	return stdin.readline().rstrip()
for _ in range(int(input())):
	x = input()
	res = 0
	r = ''
	for i in range(len(x)):
		if x[i] == '0':
			continue
		res += 1
		r += x[i] + '0' * (len(x) - i - 1) + ' '
	print(res)
	print(r)


for _ in range(int(input())):
	n = int(input())
	if n < 11:
		print(1)
		print(n)
	elif str(n)[1:] == ''.join(['0'] * (len(str(n)) - 1)):
		print(1)
		print(n)
	else:
		t = n
		c = 0
		while t:
			if t % 10 > 0:
				c += 1
			t = t // 10
		print(c)
		l = len(str(n))
		while n:
			d = n % 10
			if d == 0:
				n = n // 10
			else:
				print(d * 10 ** (l - len(str(n))), end=' ')
				n = n // 10
		print()


from sys import stdin
input = stdin.readline

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

def sep_input():
	return map(int, input().split())
for _ in range(int(input())):
	n = int(input())
	temp = []
	for i in range(5):
		temp.append(n % 10 ** i)
		n = n - n % 10 ** i
	temp.append(n)
	ans = []
	for i in range(len(temp)):
		if temp[i] != 0:
			ans.append(temp[i])
	print(len(ans))
	print(*ans)


for _ in range(int(input())):
	s = input()
	c = []
	n = len(s) - 1
	for i in range(len(s)):
		if s[i] != '0':
			c.append(int(s[i]) * 10 ** n)
		n = n - 1
	print(len(c))
	print(*c)


t = int(input())
for i in range(t):
	l = input()
	res = []
	i = 1
	length = len(l)
	for u in l:
		if int(u) > 0:
			res.append(str(int(u) * 10 ** (length - i)))
		i += 1
	print(len(res))
	print(' '.join(res))


count = int(input())
while count > 0:
	n = input()
	size = len(n)
	result = ''
	counter = 0
	for i in range(size):
		if n[i] != '0':
			result += str(int(n[i]) * pow(10, size - i - 1)) + ' '
			counter += 1
	print(counter)
	print(result)
	count -= 1


t = int(input())
for i in range(t):
	n = int(input())
	m = []
	k = 1
	while n != 0:
		if n % 10 != 0:
			m.append(n % 10 * k)
			n -= n % 10
		elif n % 10 ** (len(str(n)) - 1) == 0:
			m.append(n * k)
			break
		else:
			n //= 10
			k *= 10
	m.sort()
	print(len(m))
	print(*reversed(m))


def ongko(z):
	numbers = ''
	for j in range(1, l + 1):
		x = z % 10 ** j
		z = z - x
		if x != 0:
			numbers = numbers + str(x) + ' '
	return numbers
n = int(input())
lst = list()
for i in range(n):
	data = input()
	l = len(data)
	count = 0
	for i in data:
		if i != '0':
			count = count + 1
	lst.append(count)
	z = int(data)
	lst.append(ongko(z))
for k in lst:
	print(k)


t = int(input())
for i in range(t):
	n = int(input())
	x = []
	y = []
	if n <= 10:
		y = [n]
	elif 100 > n > 10:
		x = [n - n % 10, n % 10]
	elif 1000 > n >= 100:
		x = [n - n % 100, n % 100 - n % 10, n % 10]
	elif 10000 >= n >= 1000:
		x = [n - n % 1000, n % 1000 - n % 100, n % 100 - n % 10, n % 10]
	for i in range(len(x)):
		if x[i] != 0:
			y.append(x[i])
	print(len(y))
	print(' '.join((str(x) for x in y)))


t = int(input())
for _ in range(t):
	num = int(input())
	roundNums = []
	powTen = 0
	while num > 0:
		digit = num % 10
		roundNum = digit * 10 ** powTen
		if roundNum > 0:
			roundNums.append(roundNum)
		powTen += 1
		num = num // 10
	print(len(roundNums))
	for i in roundNums:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	no = input()
	list1 = []
	count = 0
	for i in range(len(no)):
		str1 = ''
		str1 = str1 + no[i] + str('0' * (len(no) - i - 1))
		if int(str1) != 0:
			count += 1
			list1.append(str1)
	print(count)
	for item in list1:
		print(item, end=' ')


caseN = int(input())
while caseN > 0:
	caseN -= 1
	bil = input()
	panjang = len(bil) - 1
	pengali = 1
	kumpPrint = ''
	banyak = 0
	while panjang > -1:
		if bil[panjang] != '0':
			if panjang == len(bil) - 1:
				kumpPrint = str(int(bil[panjang]) * pengali)
			else:
				kumpPrint = str(int(bil[panjang]) * pengali) + ' ' + kumpPrint
			banyak += 1
		pengali *= 10
		panjang -= 1
	print(banyak)
	print(kumpPrint)


a = int(input())
for i in range(a):
	d = []
	q = 10
	b = input()
	c = len(b)
	while c > 0:
		e = int(b) % 10
		e = e * q / 10
		if e > 0:
			d.append(str(int(e)))
		b = int(b) / 10
		c = c - 1
		q = q * 10
	print(len(d))
	print(' '.join(d))


t = int(input())
a = []
for i in range(t):
	x = int(input())
	a.append(x)
for n in a:
	ans = []
	s = str(n)
	L = [int(i) for i in s]
	L.reverse()
	j = 0
	for i in L:
		if i == 0:
			j += 1
			continue
		y = i * 10 ** j
		ans += [y]
		j += 1
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


def solution(n):
	n = str(n)
	sol = ''
	num = 0
	for (i, l) in enumerate(n):
		if l != '0':
			num += 1
			sol += l + (len(n) - 1 - i) * '0'
			sol += ' '
	print(num)
	print(sol[:-1])
t = int(input())
for i in range(1, t + 1):
	n = int(input())
	solution(n)


test_case = int(input())
for _ in range(test_case):
	num = int(input())
	if num <= 10:
		print('1')
		print(num)
	else:
		res = []
		temp_num = str(num)
		l = len(temp_num)
		for i in range(l):
			if temp_num[i] == '0':
				continue
			else:
				res.append(int(temp_num[i]) * 10 ** (l - i - 1))
		print(len(res))
		print(' '.join((str(x) for x in res)))


def solve(iteration):
	n = str(input())
	l = len(n)
	aspects = []
	for i in range(l, 0, -1):
		item = int(n[-i]) * 10 ** (i - 1)
		if item == 0:
			pass
		else:
			aspects.append(item)
	print(len(aspects))
	string = ''
	for j in range(len(aspects) - 1):
		string += str(aspects[j]) + ' '
	string += str(aspects[-1])
	print(string)
t = int(input())
for i in range(t):
	solve(i)


for _ in range(int(input())):
	n = int(input())
	temp = []
	i = 1
	while n != 0:
		curr = n % 10
		if curr != 0:
			temp.append(curr * i)
		n = n // 10
		i *= 10
	print(len(temp))
	for i in temp:
		print(i, end=' ')
	print()


def main():
	n_t = int(input())
	for t in range(n_t):
		n = int(input())
		n_str = str(n)
		k = 0
		ans = 0
		round_nums = []
		while k < len(n_str):
			if n_str[k:][0] != '0':
				round_nums.append(n_str[k:][0] + ''.join(['0' for _ in range(len(n_str) - k - 1)]))
				ans += 1
			k += 1
		print(ans)
		print(' '.join(round_nums))
main()


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


n = int(input())
a = []
for i in range(n):
	a.append(int(input()))

def calc(n):
	arr = []
	st = list(str(n))
	x = pow(10, len(st) - 1)
	for i in st:
		z = int(i)
		z = z * x
		if z != 0:
			arr.append(z)
		x = int(x / 10)
	print(len(arr))
	for i in arr:
		print(i, end=' ')
for i in a:
	calc(i)
	print('')


t = int(input())
arr = []
if t > 0 and t < 10001:
	for i in range(0, t):
		n = input()
		if int(n) > 0 and int(n) < 10001:
			arr.append(n)
l = len(arr)
for i in range(0, l):
	number = arr[i]
	len_num = len(number)
	ans1 = 0
	ans2 = []
	for j in range(0, len_num):
		x = int(number[j]) * 10 ** (len_num - (j + 1))
		if x != 0:
			ans1 += 1
			ans2.append(x)
	print(ans1)
	print(*ans2)


t = int(input())
for i in range(t):
	d = []
	a = input()
	q = len(a) - 1
	for j in a:
		if j != '0':
			ss = j
			for h in range(q):
				ss += str(0)
			d.append(ss)
		q -= 1
	n = len(d)
	print(n)
	for hhh in d:
		print(hhh)


t = int(input())
for i in range(t):
	n = list(input())
	if len(n) == 1:
		print(1)
		print(''.join(n))
	elif n[1:].count('0') == len(n) - 1:
		print(1)
		print(''.join(n))
	else:
		m = len(n) - n.count('0')
		print(m)
		for j in range(len(n)):
			if n[j] != '0':
				a = int(n[j]) * 10 ** (len(n) - j - 1)
				print(a, end=' ')
		print()


import sys
read = sys.stdin.read
from math import log10, floor

def main():
	n = int(input())
	for _ in range(n):
		t = int(input())
		ans = []
		keta = floor(log10(t))
		for i1 in range(keta, -1, -1):
			tmp1 = 10 ** keta * (t // 10 ** keta)
			if tmp1 != 0:
				ans.append(tmp1)
			t = t % 10 ** keta
			keta -= 1
		print(len(ans))
		print(*ans, sep=' ')
main()


for _ in range(int(input())):
	(n, c, ls) = (input(), 0, [])
	for i in range(1, len(n)):
		if n[i] != '0':
			ls.append(n[c] + '0' * (len(n) - c - 1))
			c = i
	ls.append(n[c] + '0' * (len(n) - c - 1))
	print(len(ls))
	print(*ls)


n = int(input())
l = []
for i in range(0, n):
	m = int(input())
	l.append(m)
for i in range(0, len(l)):
	ans = []
	p = 1
	while l[i] > 0:
		if l[i] % 10 > 0:
			ans.append(l[i] % 10 * p)
		l[i] //= 10
		p *= 10
	print(len(ans))
	print(*ans)


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = input().strip()
	LEN = len(n)
	ANS = []
	for i in range(LEN):
		if n[i] != '0':
			ANS.append(int(n[i]) * 10 ** (LEN - i - 1))
	print(len(ANS))
	print(' '.join(map(str, ANS)))


def multiple_input():
	return map(int, input().split())

def list_input():
	return list(map(int, input().split()))
for _ in range(int(input())):
	s = input()
	ans = []
	c = 10 ** (len(s) - 1)
	for i in s:
		if i != '0':
			ans.append(int(i) * c)
		c //= 10
	print(len(ans))
	print(*ans)


for x in range(int(input())):
	number = input()[::-1]
	lis = []
	for (x, y) in enumerate(number):
		if y != '0':
			lis.append(y + '0' * x)
	print(len(lis))
	print(' '.join(lis))


n = int(input())
numbres = []
for i in range(n):
	num = int(input())
	numbres.append(num)
for number in numbres:
	num = []
	t = 0
	while True:
		t = number % 10 ** (len(str(number)) - 1)
		if not t:
			num.append(number)
			break
		num.append(number - t)
		number = t
	print(len(num))
	for i in num:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	n = input()
	list1 = list(n)
	tenpow = 1
	ans = []
	for i in range(len(list1) - 1, -1, -1):
		if list1[i] == '0':
			pass
		else:
			ans.append(int(list1[i]) * tenpow)
		tenpow *= 10
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


for i in range(int(input())):
	n = int(input())
	x = str(n)
	l = len(x)
	ans = ''
	y = int('1' + '0' * (l - 1))
	r = int(n % y)
	c = 0
	while r != 0:
		ans += str(n - r) + ' '
		c += 1
		n = r
		r = n % int('1' + '0' * (len(str(n)) - 1))
	ans += str(n - r) + ' '
	c += 1
	print(c)
	print(ans)


t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	n = int(input())
	n_str = str(n)
	size = len(str(n))
	print(size - n_str.count('0'))
	for i in range(size):
		if int(n_str[i]) != 0:
			print(int(n_str[i]) * 10 ** (size - 1 - i), end=' ')
	print()


import sys
input = sys.stdin.readline
for t in range(int(input())):
	n = input().rstrip()
	print(len(n) - n.count('0'))
	l = []
	for i in range(len(n)):
		if n[0] != '0':
			l.append(int(n[0]) * pow(10, len(n) - 1))
		n = n[1:]
	print(str(l)[1:-1].replace(', ', ' '))


def round(n):
	div = 10 ** (len(n) - 1)
	result = []
	n = int(n)
	while True:
		rem = n % div
		if rem != 0:
			result.append(str(n - rem))
			n = rem
		else:
			result.append(str(n))
			break
		div = 10 ** (len(str(n)) - 1)
	return result
n = int(input())
for i in range(n):
	line1 = input().strip()
	result = round(line1)
	if len(result) == 1 and result[0] == '0':
		print(0)
	else:
		print(len(result))
	print(' '.join(result))


for _ in range(int(input())):
	n = str(input())
	le = len(n)
	l = []
	for i in range(le):
		if n[i] != '0':
			l.append(n[i] + str(0) * (le - i - 1))
	print(len(l))
	print(' '.join(l))


import math
for _ in range(int(input())):
	s = input()
	n = len(s)
	d = []
	for i in range(n):
		if int(s[i]) > 0:
			d.append(s[i] + '0' * (n - 1 - i))
	print(len(d))
	print(*d)


t = int(input())
for _ in range(t):
	arr = list(input())
	n = len(arr)
	count = 0
	s = ''
	i = 0
	while i < n:
		if arr[i] != '0':
			count += 1
			s = s + str(int(arr[i]) * 10 ** (n - i - 1)) + ' '
		i += 1
	print(count)
	print(s)


t = int(input())
for i in range(t):
	v = []
	n = input()
	for j in range(len(n)):
		p = 10 ** j
		j = len(n) - 1 - j
		if n[j] != '0':
			v.append(int(n[j]) * p)
	print(len(v))
	s = ''
	for k in v:
		s = s + str(k) + ' '
	print(s)


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


t = int(input())

def fnc(a):
	x = str(a)
	y = [0]
	z = len(x)
	cnt = 0
	for i in x:
		if i == '0':
			cnt += 1
			continue
		else:
			y.append(int(i) * 10 ** (z - cnt - 1))
			cnt += 1
	return y
for i in range(t):
	k = int(input())
	r = fnc(k)
	print(len(r) - 1)
	for s in range(1, len(r) - 1):
		print(r[s], end=' ')
	print(r[-1])


t = eval(input())
for i in range(t):
	nums = eval(input())
	kok = []
	ras = 0
	lol = []
	if 1 <= nums <= 10:
		print(1)
		print(nums)
	else:
		num1 = len(str(nums))
		for j in range(num1, -1, -1):
			num2 = nums // pow(10, j - 1)
			nums -= num2 * pow(10, j - 1)
			kok += [num2 * pow(10, j - 1)]
			if nums == 0:
				break
		for u in kok:
			if u != 0:
				lol += [u]
		c = len(lol)
		print(c)
		for j in lol:
			print(j, end=' ')
		print()


def met(a):
	for k in a:
		r = []
		i = 0
		while k != 0:
			if k % 10 != 0:
				r.append(str(k % 10 * 10 ** i))
			i += 1
			k = k // 10
		print(len(r))
		print(' '.join(r))
n = int(input())
a = []
for i in range(n):
	a.append(int(input()))
met(a)


t = int(input())
for i in range(t):
	a = []
	n = int(input())
	k2 = str(n)
	n1 = n
	m = 0
	n2 = 1
	count = 0
	while n2 > 0:
		n2 = n1 // 10 ** m
		m = m + 1
	m = m - 1
	m1 = m
	if m == 1:
		a.append(int(n))
		count = 1
	else:
		mop = [int(i) for i in str(k2)]
		for j in mop:
			if j == 0:
				m = m - 1
			else:
				ans = j * 10 ** m
				m = m - 1
				a.append(int(ans / 10))
				count = count + 1
	print(count)
	print(*a)


import math
q = int(input())
while q > 0:
	res = 0
	a = ''
	n = int(input())
	count = math.floor(math.log10(n) + 1)
	if n <= 10:
		res += 1
		a = a + str(n)
	else:
		for i in range(count):
			v = n % 10
			if v != 0:
				a = a + str(int(v * 10 ** i)) + ' '
				res += 1
			n = n // 10
	print(res)
	print(a)
	q = q - 1


x = int(input())
ns = ''
for _ in range(x):
	y = int(input())
	tot = 0
	s = ''
	ran = [len(str(y)) - i - 1 for i in range(len(str(y)))]
	for __ in ran:
		if y // 10 ** __ != 0:
			tot += 1
			s += str(y - y % 10 ** __) + ' '
			y = y % 10 ** __
	ns += str(tot) + '\n'
	ns += s + '\n'
print(ns)


t = int(input())
for i in range(t):
	n = int(input())
	n = str(n)
	n = list(n)
	n = n[::-1]
	a = []
	for i in range(len(n)):
		g = n[i]
		if g != '0':
			g1 = []
			g1.append(g)
			g1.append(str(pow(10, i)))
			a.append(int(g1[0]) * int(g1[1]))
	print(len(a))
	print(*a)


t = int(input())
k = 0
x = 1
while t > 0:
	n = int(input())
	if n <= 10:
		k = n
		print(1)
		print(k)
	if n > 10:
		l = 0
		p = []
		while n > 0:
			b = n % 10
			n //= 10
			if b * x > 0:
				l += 1
				p.append(b * x)
			x *= 10
		print(l)
		for i in p:
			print(i, end=' ')
		print()
	x = 1
	t -= 1


t = int(input())
for i in range(t):
	num = str(input())
	nums = []
	for j in range(len(num)):
		if num[j] != '0':
			nums += [num[j] + '0' * (len(num) - 1 - j)]
	print(len(nums))
	s = ''
	for x in nums:
		s += x + ' '
	print(s[:-1])


number_of_test_cases = int(input())

def rnd(n):
	list = []
	for i in range(len(n)):
		if n[i] != '0':
			list.append(n[i] + '0' * (len(n) - 1 - i))
	return list
for i in range(number_of_test_cases):
	n = input()
	round_numbers = rnd(n)
	print(len(round_numbers))
	for i in round_numbers:
		print(i, end=' ')
	print()


t = int(input())
for s in range(t):
	n = list(input())
	n.reverse()
	ans = []
	for i in range(len(n)):
		if i == len(n) - 1:
			ans.append(int(n[i]) * 10 ** i)
		elif n[i] != '0':
			ans.append(int(n[i]) * 10 ** i)
	print(len(ans), ' '.join(map(str, ans)), sep='\n')


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


for _ in range(int(input())):
	n = input()
	x = len(n)
	arr = []
	for i in n:
		x -= 1
		if i != '0':
			temp = i + '0' * x
			arr.append(temp)
	print(len(arr))
	print(*arr)


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


for _ in range(int(input())):
	a = str(input())
	m = k = s = int(0)
	n = []
	z = len(a)
	x = z - 1
	while x >= 0:
		if a[x] != '0':
			m = m + 1
			n.append(int(a[x]) * pow(10, z - x - 1))
			s = s + 1
		x = x - 1
	print(m)
	print(*n)


p = int(input())
o = []
o1 = []
for i in range(p):
	m = input()
	n = int(m)
	j = 10
	a = []
	for i in range(0, len(m)):
		t = n % j
		a.append(t)
		n -= t
		j *= 10
	na = []
	for i in a:
		if i != 0:
			na.append(i)
	o.append(len(na))
	o1.append(na)
for i in range(p):
	print(o[i])
	for j in o1[i]:
		print(j, end=' ')
	print('')


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


x = int(input())
nums = [input() for _ in range(x)]
for num in nums:
	d = ''
	count = 0
	leng = len(num)
	if leng == 1:
		print(f'1\n{num}')
	else:
		for let in num:
			if let == '0':
				pass
			else:
				count += 1
				d += let
				for _ in range(leng - 1):
					d += '0'
				d += ' '
			leng -= 1
		print(count)
		print(d)


n = int(input())
x = 0
y = 0
for i in range(n):
	s = input()
	y = len(s)
	x = len(s) - 1
	for k in s:
		if int(k) * 10 ** x == 0:
			y -= 1
	print(y)
	for k in s:
		if int(k) * 10 ** x != 0:
			print(int(k) * 10 ** x, end=' ')
		x -= 1


import math
t = input()
t = int(t)
while t > 0:
	x = input()
	x = int(x)
	li = list()
	while x != 0:
		y = math.log10(x)
		y = int(y)
		r = x % 10 ** y
		if y != 0:
			li.append(x - r)
			x = r
		else:
			li.append(x)
			break
	print(len(li))
	for p in li:
		print(p, end=' ')
	print('\r')
	t = t - 1


import math
t = int(input())
i = 1
while i <= t:
	n = int(input())
	l = len(str(n))
	s = str(n)
	lst = []
	c = s.count('0')
	if l == 1 and n != 0:
		print(1)
		print(n)
	elif s[0] != 0 and c == l - 1:
		print(1)
		print(n)
	else:
		for j in range(0, l):
			m = n % 10
			if m != 0:
				a1 = int(m * math.pow(10, j))
				lst += [a1]
			n = n // 10
		print(len(lst))
		print(*lst)
	i += 1


for _ in range(int(input())):
	n = int(input())
	length = 0
	res = []
	while n > 0:
		r = n % 10
		n = n // 10
		if r != 0:
			res.append(str(r) + '0' * length)
		length += 1
	print(len(res))
	print(' '.join(res))


t = int(input())
for v in range(t):
	n = int(input())
	flag = 0
	i = 0
	li = []
	while n > 0:
		dig = n % 10
		n = n // 10
		if dig != 0:
			flag += 1
			li.append(dig * pow(10, i))
		i += 1
	print(flag)
	for item in li:
		print(item, end=' ')
	print()


for t in range(int(input())):
	n = int(input())
	l = []
	while True:
		if n == 0:
			break
		v = int(str(n)[0] + '0' * (len(str(n)) - 1))
		l.append(v)
		n -= v
	print(len(l))
	print(*l, sep=' ')


n = int(input())
for i in range(n):
	a = []
	x = int(input())
	times = 1
	while x > 0:
		if x % 10 > 0:
			a.append(x % 10 * times)
		x = x // 10
		times *= 10
	print(len(a))
	print(' '.join(map(str, a)))


t = int(input())
for q in range(t):
	n = input()
	nums = []
	l = len(n)
	for x in range(len(n)):
		if int(n[x]) != 0:
			nums.append(n[x] + '0' * (l - 1 - x))
	print(len(nums))
	for x in nums:
		print(x, end=' ')
	print()


import sys
from math import ceil
from itertools import islice, cycle
from collections import Counter, defaultdict
stdin = sys.stdin
t = stdin.readline()
t = int(t)
for test in range(t):
	n = stdin.readline().strip()
	num_zeros = len(n) - 1
	collection = []
	for m in n:
		if m != '0':
			collection.append(m + '0' * num_zeros)
		num_zeros -= 1
	print(len(collection))
	print(' '.join(collection))


t = int(input())
for i in range(t):
	n = input()
	l = len(n)
	s = 1
	li = []
	for i in range(1, l + 1):
		h = int(n[-i]) * s
		s = s * 10
		if h > 0:
			li.append(h)
	le = len(li)
	print(le)
	for i in li:
		print(i, end=' ')
	print()


def main():
	ans = ''
	for _ in range(int(input())):
		x = list(input())
		l = len(x)
		arr = []
		for (i, xi) in enumerate(x):
			if xi != '0':
				arr.append(str(int(xi) * 10 ** (l - i - 1)))
		ans += f"{len(arr)}\n{' '.join(arr)}\n"
	print(ans)
main()


t = int(input())
for _ in range(t):
	n = int(input())
	x = 1
	ans = []
	while n:
		temp = str(n % 10 * x)
		if temp != '0':
			ans.append(temp)
		x = x * 10
		n = n // 10
	print(len(ans))
	print(' '.join(ans))


n = int(input())
b = []
for i in range(n):
	a = input()
	for j in range(0, len(a)):
		if int(a[j]) != 0:
			c = len(a) - 1 - j
			e = pow(10, c)
			f = int(a[j]) * e
			b.append(str(f))
	print(len(b))
	ch = ' '
	b = ch.join(b)
	print(b)
	b = list(b)
	b.clear()


import math
t = int(input())
for i in range(t):
	n = input()
	val = 1
	arr = []
	for j in range(len(n) - 1, -1, -1):
		if int(n[j]) != 0:
			arr.append(int(n[j]) * val)
		val = val * 10
	print(len(arr))
	for j in arr:
		print(j, end=' ')


t = int(input())
for i in range(0, t):
	n = int(input())
	i = 0
	a = 0
	ans = str()
	while n > 0:
		r = n % 10
		if r != 0:
			a += 1
		n = n // 10
		r = r * 10 ** i
		if r != 0:
			r = str(r)
			ans = ans + r + ' '
		i += 1
	print(a)
	print(ans)


t = int(input())
for i in range(t):
	n = input()
	L = []
	for x in range(len(n)):
		if n[x] != '0':
			L.append(int(n[x]) * 10 ** (len(n) - x - 1))
	print(len(L))
	print(*L, sep=' ')


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)


t = int(input())
for i in range(t):
	ans = []
	n = int(input())
	pot = 1
	while n > 0:
		if n % 10 != 0:
			ans.append(n % 10 * pot)
		n /= 10
		n = int(n)
		pot *= 10
	print(len(ans))
	for v in ans:
		print(v, end=' ')
	print('\n')


n = int(input())
for i in range(n):
	t = input()
	res = []
	while int(t) > 0:
		e = int('1' + '0' * (len(t) - 1))
		t = int(t)
		res.append(t - t % e)
		t %= e
		t = str(t)
	print(len(res))
	print(' '.join((str(i) for i in res)))


test = int(input())
for i in range(test):
	c = input()
	sumand = 0
	j = 1
	li = []
	for x in range(1, len(c) + 1):
		if '0' not in c[-x]:
			li.append(int(c[-x]) * j)
			sumand += 1
		j *= 10
	print(sumand)
	for i in li:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	num = int(input())
	pres = 1
	ans = []
	while num > 0:
		if num % 10 != 0:
			ans.append(num % 10 * pres)
		num //= 10
		pres *= 10
	print(len(ans))
	for fin in ans:
		print(fin, end=' ')
	print()


t = int(input())
for c in range(t):
	n = input()
	L = [int(n[i]) * 10 ** (len(n) - i - 1) for i in range(len(n)) if n[i] != '0']
	print(len(L))
	for el in L:
		print(el, end=' ')
	print()


for _ in range(int(input())):
	n = input()
	li = list(n)
	l = len(n)
	c = 0
	ans = []
	for i in range(l):
		if li[i] != '0':
			c = c + 1
			ans.append(li[i] + '0' * (l - i - 1))
	print(c)
	for a in ans:
		print(a, end=' ')


for _ in range(int(input())):
	num = input()
	n = len(num)
	cnt = 0
	res = []
	for i in range(n):
		temp = int(num[i]) * 10 ** (n - i - 1)
		if temp != 0:
			res.append(str(temp))
	print(len(res))
	print(' '.join(res))


def f(x):
	k = 0
	s = 1
	arr = []
	while x > 0:
		b = x % 10
		if b != 0:
			arr.append(str(b * s))
			k += 1
		x = x // 10
		s *= 10
	return (k, arr)
n = int(input())
arr = []
for i in range(n):
	arr.append(int(input()))
for i in range(n):
	(k, s) = f(arr[i])
	print(k)
	print(' '.join(s))


x = int(input())
for i in range(x):
	c = input()
	l = []
	k = 1
	for j in c:
		l.append(str(j) + (len(c) - k) * '0')
		k = k + 1
	l = list(map(int, l))
	l = list(filter(bool, l))
	print(len(l))
	print(' '.join(map(str, l)))


def round_no():
	t = int(input())
	count = -1
	for i in range(t):
		count = 0
		n = input()
		if n.count('0') == len(n) - 1:
			print(1)
			print(n)
			continue
		n = n[::-1]
		num = []
		res = ''
		for j in range(len(n)):
			k = int(n[j])
			if k != 0:
				res += str(k * pow(10, j)) + ' '
				count += 1
		print(count)
		print(res)
round_no()


for t in range(int(input())):
	n = input()
	prod = 1
	sol = []
	for i in range(1, len(n) + 1):
		if n[-1 * i] != '0':
			sol.append(int(n[-1 * i]) * prod)
		prod *= 10
	print(len(sol))
	print(*sol)


t = int(input())
for i in range(0, t):
	n = input()
	length = len(n)
	no = int(n)
	check = []
	mult = 1
	counter = 0
	for i in range(0, length):
		check.append(no % 10)
		no = int(no / 10)
	for i in range(0, length):
		check[i] = check[i] * mult
		mult = mult * 10
	for i in range(0, length):
		if check[i] == 0:
			counter = counter + 1
	for i in range(0, counter):
		check.remove(0)
	print(len(check))
	print(*check)


t = int(input())
for i in range(t):
	n = int(input())
	a = 1
	c = 0
	b = 10
	x = []
	while n > 9:
		p = n % b
		if p:
			x.append(p * pow(b, c))
			a += 1
		n = n // b
		c += 1
	x.append(n * pow(10, c))
	print(a)
	for i in range(len(x) - 1, -1, -1):
		print(x[i], end=' ')
	print('\n')


import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
	n = ni()
	l = list()
	for i in range(1, 6):
		if n % 10 ** i:
			l.append(n % 10 ** i)
			n -= n % 10 ** i
	print(len(l))
	print(*l)
	return
T = ni()
for _ in range(T):
	solve()


import math
t = int(input())
for i in range(t):
	x = str(input())
	j = math.floor(math.log10(int(x)) + 1)
	k = 0
	count = 0
	ans = []
	while j > 0:
		val = int(x[k]) * 10 ** (j - 1)
		if val > 0:
			count += 1
			ans.append(val)
		k += 1
		j -= 1
	print(count)
	for item in ans:
		print(item, end=' ')
	print('')


for i in range(int(input())):
	x = str(input())
	a = 1
	w = []
	print(len(x) - x.count('0'))
	x = x[-1::-1]
	for j in x:
		if j != '0':
			w.append(int(j) * a)
		a *= 10
	print(*w[-1::-1], sep=' ')


T = int(input())
for _ in range(T):
	N = input()
	Nos = []
	last = N[0]
	for i in range(1, len(N)):
		if N[i] != '0':
			last = last + '0' * (len(N) - i)
			Nos.append(last)
			last = N[i]
		else:
			last = last + N[i]
	if last != '':
		Nos.append(last)
	print(len(Nos))
	print(' '.join(Nos))


t = int(input())
for _ in range(t):
	arr = []
	num = input()
	for i in range(len(num) - 1, -1, -1):
		if num[i] != '0':
			arr.append(int(num[i]) * 10 ** (len(num) - i - 1))
	print(len(arr))
	for i in range(len(arr)):
		if i == len(arr) - 1:
			print(arr[i])
		else:
			print(arr[i], end=' ')


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)


k = int(input())
new = ''
l = []
b = []
if k >= 1 and k <= 10000:
	for i in range(0, k):
		n = int(input())
		p = len(str(n)) - 1
		if n >= 1 and n <= 10000:
			count = 1
			while n > 10 and p != 0:
				t = 10 ** p
				d = n // t
				n = n % t
				p = p - 1
				if d * t != 0:
					count = count + 1
					new += str(d * t) + '  '
			if n == 0:
				count -= 1
				b.append(count)
				l.append(new)
			else:
				new += str(n)
				b.append(count)
				l.append(new)
			new = ''
for h in range(0, k):
	print(b[h])
	print(l[h])


t = int(input())
while t:
	z = input()
	le = len(z) - 1
	l = []
	for i in range(le):
		l.append(int(z[i] + '0' * (le - i)))
	if int(z[-1]):
		l.append(int(z[-1]))
	print(sum([1 for i in l if i > 0]))
	for i in l:
		if i:
			print(i, end=' ')
	if t > 1:
		print('')
	t -= 1


t = int(input())
for i in range(t):
	result = []
	n = list(map(int, input()))
	for j in range(len(n)):
		if n[j] != 0:
			result.append(n[j] * 10 ** (len(n) - j - 1))
	print(len(result))
	for p in range(len(result)):
		if p < len(result) - 1:
			print(result[p], end=' ')
		else:
			print(result[p])


for _ in range(int(input())):
	n = int(input())
	arr = []
	i = 1
	j = n
	while j != 0:
		num = j % 10
		if num == 0:
			i *= 10
			j = j // 10
		else:
			ans = num * i
			arr.append(ans)
			i *= 10
			j = j // 10
	print(len(arr))
	for i in arr:
		print(i, end=' ')
	print()


def batado(n):
	k = 0
	l = []
	count = 0
	while n > 0:
		x = n % 10
		if x == 0:
			count += 1
		if x != 0:
			count += 1
			k += 1
			l.append(x * 10 ** (count - 1))
		n = n // 10
	print(k)
	for i in l:
		print(i, end=' ')
t = int(input())
for i in range(t):
	n = int(input())
	ans = batado(n)
	ans


for _ in range(int(input())):
	n = input()
	l = len(n)
	arr = list(n)
	for i in range(l):
		arr[i] = int(arr[i])
	for i in range(l):
		arr[i] *= 10 ** (l - i - 1)
	ans = []
	for i in arr:
		if i != 0:
			ans.append(i)
	print(len(ans))
	print(*ans)


t = int(input())
for X in range(1, t + 1):
	n = int(input())
	i = 1
	ans = []
	while n:
		p = n % 10
		if p:
			ans.append(p * i)
		i *= 10
		n = n // 10
	print(len(ans))
	for x in ans:
		print(x, end=' ')
	print()


n = int(input())
for i in range(n):
	size = 1
	a = int(input())
	s = ''
	while a > 0:
		t = a % 10
		if t > 0:
			s += str(t * size) + ' '
		a = a // 10
		size = size * 10
	o = s.split()
	print(len(o))
	print(s)


cases = int(input())
for case in range(cases):
	n = int(input())
	c = 0
	l = 0
	ans = ''
	while n:
		mod = n % 10
		if mod != 0:
			ans += str(mod) + '0' * l + ' '
			c += 1
		n //= 10
		l += 1
	print(c)
	print(ans[:-1])


x = input()
x = int(x)
u = []

def code(r):
	l = len(r)
	o = []
	k = 1
	o.append(int(r[0]) * 10 ** (len(r) - 1))
	while k < l:
		if r[k] != '0':
			o.append(int(r[k]) * 10 ** (len(r) - k - 1))
		k += 1
	print(len(o))
	b = 0
	while b < len(o):
		print(o[b], end=' ')
		b += 1
	print('')
z = 0
while z < x:
	y = input()
	u.append(y)
	z += 1
f = 0
while f < x:
	code(u[f])
	f += 1


for i in range(int(input())):
	n = int(input())
	div = []
	while n > 0:
		div.append(int(n % 10))
		n = int(n / 10)
	ans = []
	k = 0
	for i in range(len(div)):
		if div[i] > 0:
			k += 1
			ans.append(int(div[i] * 10 ** i))
	print(k)
	print(' '.join((str(i) for i in ans)))


for _ in range(int(input())):
	n = int(input())
	nums = []
	while n:
		nums.append(n % 10 * 10 ** len(nums))
		n //= 10
	nums = list(filter(lambda x: x, nums))
	nums.sort(reverse=True)
	print(len(nums))
	print(*nums)


N = int(input())
answers = []
for i in range(N):
	x = int(input())
	done = False
	if x < 10:
		done = True
		answers.append({1: [x]})
	elif str(x).count('0') + 1 == len(str(x)):
		done = True
		answers.append({1: [x]})
	if not done:
		numbers = []
		cnt = 0
		reductor = pow(10, len(str(x)) - 1)
		for num in str(x):
			if num != '0':
				cnt += 1
				numbers.append(int(num) * reductor)
			reductor = reductor // 10
		answers.append({cnt: numbers})
for i in answers:
	print(list(i.keys())[0])
	for k in i[list(i.keys())[0]]:
		print(k, end=' ')
	print()


for _ in range(int(input())):
	n = input()
	ro = ''
	c = 0
	for i in range(len(n)):
		if n[i] != '0':
			r = n[i] + '0' * (len(n) - (i + 1))
			ro = ro + r + ' '
			c = c + 1
	print(c)
	print(ro)


from sys import *
from math import *
from collections import *
mod = 1000000007

def get_array():
	return list(map(int, stdin.readline().split()))

def get_ints():
	return map(int, stdin.readline().split())

def read_int():
	return int(stdin.readline())

def input():
	return stdin.readline()

def main():
	tc = read_int()
	while tc:
		N = read_int()
		arr = []
		power = 1
		while N > 0:
			if N % 10 > 0:
				arr.append(N % 10 * power)
			N //= 10
			power *= 10
		stdout.write(str(len(arr)) + '\n')
		print(*arr)
		tc -= 1
main()


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


def solve(s):
	trace = []
	cnt = len(s)
	if cnt == 1:
		print('1')
		print(s)
		return
	for i in range(len(s)):
		if s[i] == '0':
			cnt -= 1
			continue
		else:
			trace.append(int(s[i]) * 10 ** (cnt - 1))
			cnt -= 1
	print(len(trace))
	print(' '.join(map(str, trace)))
	return
t = int(input())
for _ in range(t):
	n = input()
	solve(n)


def solve(a):
	ans = []
	mul = 1
	while a > 0:
		tail = a % 10
		a //= 10
		if tail > 0:
			ans.append(mul * tail)
		mul *= 10
	print(len(ans))
	print(' '.join(map(str, ans)))
t = int(input())
for i in range(t):
	a = int(input())
	solve(a)


t = int(input())
for _ in range(t):
	n = int(input())
	integers = 0
	l = []
	if n // 10000 >= 1:
		l.append(10000 * (n // 10000))
		n -= 10000 * (n // 10000)
		integers += 1
	if n // 1000 >= 1:
		l.append(1000 * (n // 1000))
		n -= 1000 * (n // 1000)
		integers += 1
	if n // 100 >= 1:
		l.append(100 * (n // 100))
		n -= 100 * (n // 100)
		integers += 1
	if n // 10 >= 1:
		l.append(10 * (n // 10))
		n -= 10 * (n // 10)
		integers += 1
	if n > 0:
		integers += 1
		l.append(n)
	l = str(l)
	l = l.replace('[', '')
	l = l.replace(']', '')
	l = l.replace(',', '')
	print(integers)
	print(l)


for _ in range(int(input())):
	n = int(input())
	l = []
	count = 0
	while n > 0:
		x = n % 10
		if x != 0:
			l.append(x * pow(10, count))
		n = n // 10
		count += 1
	print(len(l))
	print(*l)


t = int(input())
for i in range(t):
	n_ = input()
	ls = list()
	c = 0
	for j in range(len(n_)):
		if n_[j] == '0':
			continue
		c += 1
		ls.append(str(int(n_[j]) * 10 ** (len(n_) - 1 - j)))
	print(c)
	print(' '.join(ls).strip())


import math
for _ in range(int(input())):
	n = int(input())
	l = []
	d = len(str(n))
	s = str(n)
	count = 0
	for i in range(0, len(s)):
		if int(s[i]) * 10 ** (len(s) - i - 1) == 0:
			continue
		else:
			l.append(int(s[i]) * 10 ** (len(s) - i - 1))
			count += 1
	print(count)
	print(*l)


N = int(input())
A = [input() for _ in range(N)]
for a in A:
	len_a = len(a)
	cnt = 0
	tmp = []
	for (i, aa) in enumerate(a):
		if aa != '0':
			cnt += 1
			tmp.append(int(aa) * 10 ** (len_a - i - 1))
	print(cnt)
	print(*tmp)


for _ in range(int(input())):
	ans = [v * 10 ** i for (i, v) in enumerate(list(map(int, input()))[::-1]) if v]
	print(len(ans))
	print(*ans)


l = [1, 10, 100, 1000, 10000]
for _ in range(int(input())):
	n = int(input())
	output = []
	i = 0
	while n:
		no = n % 10
		if no * l[i] > 0:
			output.append(no * l[i])
		n = n // 10
		i += 1
	print(len(output))
	print(' '.join((str(i) for i in output)))


def round_numbers(n):
	a = []
	c = 0
	i = 1
	while n != 0:
		p = int(n / 10)
		d = n - p * 10
		if d != 0:
			c = c + 1
			a.append(d * i)
		i = i * 10
		n = int(n / 10)
	print(c)
	for x in a:
		print(x, end=' ')
	print(end='\n')
n = int(input())
a = []
for i in range(n):
	value = int(input())
	a.append(value)
for x in a:
	round_numbers(x)


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(str(n))
	arr1 = []
	for i in range(len(arr)):
		if arr[i] != '0':
			arr1.append(int(arr[i]) * 10 ** (len(arr) - i - 1))
	print(len(arr1))
	for i in range(len(arr1)):
		print(arr1[i], end=' ')
	print()


t = int(input())
while t != 0:
	t -= 1
	s = input()
	l = []
	n = []
	count = 0
	if len(s) == 1:
		print(1)
		print(s)
	elif len(s) > 1 and s.count('0') == len(s) - 1:
		print(1)
		print(s)
	else:
		l = list(s)
		for i in range(len(l)):
			if l[i] == '0':
				continue
			else:
				count += 1
				n.append(l[i] + '0' * (len(l) - i - 1))
		print(count)
		print(*n)


t = int(input())
for _ in range(t):
	n = int(input())
	m = n
	l = {}
	for i in range(10000, 999, -1000):
		if n - i >= 0:
			l[i] = 1
			n -= i
	for i in range(900, 99, -100):
		if n - i >= 0:
			l[i] = 1
			n -= i
	for i in range(90, 9, -10):
		if n - i >= 0:
			l[i] = 1
			n -= i
	if n > 0:
		l[n] = 1
	print(len(l))
	for key in l.keys():
		print(key, end=' ')
	print()


num_tests = int(input())
for i in range(num_tests):
	n = int(input())
	carry = 0
	terms = 0
	addends = ''
	while n:
		if n % 10:
			addends += str(10 ** carry * (n % 10)) + ' '
			terms += 1
		n //= 10
		carry += 1
	print(terms)
	print(addends)


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


for _ in range(int(input())):
	a = input()
	ans = []
	if len(a) == 1:
		print(1)
		print(a)
	else:
		for i in range(len(a)):
			if a[i] != '0':
				x = int(a[i]) * 10 ** (len(a) - i - 1)
				ans.append(x)
		print(len(ans))
		for i in ans:
			print(i, end=' ')


t = int(input())
for i in range(t):
	n = int(input())
	mul = 1
	res = []
	while n > 0:
		last = n % 10
		if last != 0:
			res.append(mul * last)
		n = n // 10
		mul = mul * 10
	print(len(res))
	print(*res)


t = int(input())
for i in range(t):
	x = int(input())
	if x < 10:
		print(1)
		print(x)
	else:
		v = []
		q = str(x)
		for i in range(len(q)):
			if q[i] != '0':
				v.append(int(q[i]) * 10 ** (len(q) - i - 1))
		print(len(v))
		for i in range(len(v)):
			print(v[i], end=' ')
		print()


def solve(n):
	(p, ans) = (1, [])
	while n > 0:
		if n % 10 != 0:
			ans.append(p * (n % 10))
		p *= 10
		n //= 10
	print(len(ans))
	print(*ans)
t = int(input())
for _ in range(t):
	solve(int(input()))


for _ in range(int(input())):
	n = input()
	ml = len(n)
	ar = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		else:
			ar.append(n[i] + '0' * (ml - i - 1))
	print(len(ar))
	print(*ar)


t = int(input())
for _ in range(t):
	n = input()[::-1]
	k = 0
	a = ''
	for i in range(len(n)):
		if int(n[i]):
			k += 1
			a += str(int(n[i]) * 10 ** i) + ' '
	print(k)
	print(a)


round = [i for i in range(1, 10001) if str(i).count('0') == len(str(i)) - 1][::-1]
n = int(input())
for i in range(n):
	t = int(input())
	ans = []
	for i in round:
		if t == 0:
			break
		elif i <= t:
			m = t // i
			t -= i * m
			ans.extend([i] * m)
	print(len(ans))
	print(' '.join(list(map(str, ans))))


k = int(input())
for i in range(k):
	n = input()
	a = []
	for j in range(len(n)):
		if n[j] != '0':
			a += [int(n[j]) * 10 ** (len(n) - 1 - j)]
	print(len(a))
	for j in range(len(a)):
		print(a[j], end=' ')
	print()


t = int(input())
output = []
for i in range(t):
	n = input()
	count = len(n) - 1
	lis = []
	for k in range(len(n)):
		a = int(n[k]) * 10 ** count
		if a != 0:
			lis.append(a)
		count -= 1
	output.append(len(lis))
	output.append('\n')
	for q in lis:
		output.append(str(q) + ' ')
	output.append('\n')
s = ''
for i in output:
	s += str(i)
print(s)


for _ in range(int(input())):
	n = input()
	j = 1
	res = []
	n = list(n)
	for i in reversed(n):
		if int(i) != 0:
			res.append(int(i) * j)
		j *= 10
	print(len(res))
	print(*res)


n = int(input())
while n > 0:
	digits = [int(i) for i in list(input())]
	summands = []
	for (i, digit) in enumerate(digits):
		if digit != 0:
			summands.append(str(digit) + '0' * (len(digits) - i - 1))
	print(len(summands))
	print(' '.join(summands))
	n = n - 1


def solve():
	n = int(input())
	k = 1
	answer = list()
	while n > 0:
		rest = n % (k * 10)
		if rest:
			answer.append(rest)
		n -= rest
		k *= 10
	print(len(answer))
	for el in answer:
		print(el)
t = int(input())
for _ in range(t):
	solve()


T = int(input())
for t in range(T):
	n = int(input())
	lst = [int(d) for d in str(n)]
	num = []
	count = 0
	j = len(lst)
	for i in range(j):
		if lst[i] != 0:
			count += 1
			num.append(lst[i] * 10 ** (j - i - 1))
	print(count)
	for i in num:
		print(i, end=' ')


t = int(input())
while t:
	x = input()
	list_x = list(x)
	while list_x.count('0'):
		list_x.remove('0')
	print(str(len(list_x)))
	xx = int(x)
	for i in range(len(x)):
		if xx % 10:
			print(str(xx % 10 * 10 ** i) + ' ')
		xx = int(xx / 10)
	t -= 1


n = int(input())
for _ in range(n):
	i = int(input())
	si = str(i)
	arr = [si[idx] + (len(si) - idx - 1) * '0' for idx in range(len(si)) if si[idx] != '0']
	print(len(arr))
	print(' '.join(arr))


t = int(input())
for i in range(t):
	fl = 0
	n = list(input())
	st = ''
	for j in range(len(n)):
		if n[j] != '0':
			st += n[j]
			st += '0' * (len(n) - j - 1)
			st += ' '
			fl += 1
	st = st[:-1]
	print(fl)
	print(st)


t = int(input())
while t:
	n = int(input())
	count = 0
	length = len(str(n))
	s = str(n)
	li = []
	k = pow(10, length - 1)
	l = n / k
	if length == 1 or str(l) == str(s[0] + '.0'):
		print(1)
		print(n)
	else:
		for i in range(length):
			if s[i] != '0':
				count = count + 1
				li.append(int(s[i]) * pow(10, length - i - 1))
		print(count)
		for j in li:
			print(j, end=' ')
		print()
	t = t - 1


n = int(input())
import math
while n > 0:
	x = input()
	l = len(x)
	x = int(x)
	a = []
	for i in range(1, l + 1):
		a.append(math.pow(10, i))
	ans = []
	for item in a:
		if x % item != 0:
			ans.append(x % item)
			x = x - x % item
		else:
			continue
	print(len(ans))
	for item in ans:
		print(int(item), end=' ')
	print()
	n -= 1


t = int(input())
for _ in range(t):
	s = input()
	res = []
	l = len(s)
	for i in range(l):
		if s[i] == '0':
			continue
		res.append(s[i] + '0' * (l - i - 1))
	l = len(res)
	print(l)
	for i in range(l):
		print(res[i], end=' ')
	print('')


n = int(input())
for i in range(n):
	s = input()
	l1 = len(s)
	new = []
	for i in s:
		if i != '0':
			new.append(i + '0' * (l1 - 1))
		l1 = l1 - 1
	print(len(new))
	print(*new)


size = int(input())
numbers = []
i = 0
while i < size:
	tmp = input()
	numbers.append(tmp)
	i += 1
i = 0
while i < size:
	s = numbers[i]
	roundNumbers = []
	j = 0
	while j < len(s):
		if s[j] == '0':
			j += 1
			continue
		roundNumbers.append(s[j] + '0' * (len(s) - j - 1))
		j += 1
	print(len(roundNumbers))
	print(' '.join(roundNumbers))
	i += 1


t = int(input())
while t:
	t -= 1
	n = input().lstrip('0')
	if 1 <= int(n) <= 9:
		print(1)
		print(n)
	else:
		d = 0
		l = []
		for i in range(len(n)):
			d = int(n[i]) * 10 ** (len(n) - 1 - i)
			if d != 0:
				l.append(d)
		print(len(l))
		print(*l)


n = int(input())
I = []
for i in range(n):
	k = input()
	I.append(k)

def output(l):
	m = []
	for i in range(1, len(l) + 1):
		k = int(l[-i]) * 10 ** (i - 1)
		if k != 0:
			m.append(k)
	return m
for i in range(n):
	a = ''
	print(len(output(I[i])))
	for j in output(I[i]):
		a = a + str(j) + ' '
	print(a)


def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())
import collections as c

def solve():
	A = listStr()
	A.reverse()
	power = len(A) - 1
	ans = []
	while A:
		x = int(A.pop())
		if x:
			ans.append(x * 10 ** power)
		power -= 1
	print(len(ans))
	print(*ans)
T = getInt()
for t in range(T):
	solve()


t = int(input())
for _ in range(t):
	n = int(input())
	if n == 10 ** (len(str(n)) - 1):
		print(1)
		print(n)
		continue
	if n < 9:
		print(1)
		print(n)
		continue
	else:
		e = len(str(n))
		print(len(str(n)) - str(n).count('0'))
		for i in range(len(str(n))):
			if i == -2:
				print(int(str(n)[-2]) * 10, end=' ')
			if i == -1:
				print(str(n)[-1], end=' ')
			if int(str(n)[i]) == 0:
				e = e - 1
				continue
			else:
				print(int(str(n)[i]) * 10 ** (e - 1), end=' ')
				e = e - 1
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	li = []
	mul = 10
	if n % 10 != 0:
		li.append(n % 10)
	n = n // 10
	while n != 0:
		val = n % 10
		ap = val * mul
		if ap != 0:
			li.append(val * mul)
		mul = mul * 10
		n = n // 10
	print(len(li))
	print(*li)


from sys import stdin
T = int(input())
for _ in range(T):
	(N,) = stdin.readline().split()
	l = len(N)
	res = []
	for i in range(l):
		if N[i] != '0':
			res.append(N[i] + '0' * (l - 1 - i))
	print(len(res))
	print(' '.join(res))


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


(t,) = map(int, input().split())
for _ in range(t):
	(N,) = map(int, input().split())
	s = str(N)[::-1]
	r = []
	for i in range(len(s)):
		if int(s[i]) == 0:
			continue
		r.append(int(s[i]) * 10 ** i)
	print(len(r))
	print(*r)


def process(iele):
	nonzero = 0
	lateprint = []
	for i in range(len(iele)):
		if iele[i] != '0':
			nonzero += 1
			listitem = int(iele[i]) * 10 ** (len(iele) - i - 1)
			lateprint.append(listitem)
	print(nonzero)
	print(*lateprint)
t = int(input())
for i in range(t):
	iele = input()
	process(iele)


testCase = int(input())
for i in range(testCase):
	value = int(input())
	num_list = []
	mul = 1
	while value > 0:
		remainder = value % 10
		num_list.append(remainder * mul)
		mul = mul * 10
		value = value // 10
	print(len(num_list) - num_list.count(0))
	for j in num_list:
		if j != 0:
			print(j, end=' ')
	print()


t = int(input())
for n in range(t):
	x = input()
	ammount = 0
	export = ''
	for i in range(len(x)):
		if x[i] != '0':
			ammount += 1
			export += x[i] + '0' * (len(x) - (i + 1)) + ' '
	print(ammount)
	print(export)


for _ in range(int(input())):
	o = input()
	if len(o) == 1:
		print(1)
		print(o, end='')
	else:
		c = []
		for a in range(len(o)):
			if o[a] != 0:
				x = int(o[a]) * 10 ** (len(o) - (a + 1))
				if x != 0:
					c.append(x)
		print(len(c))
		for q in c:
			print(q, end=' ')
	print()


from math import *
from bisect import bisect_left, bisect_right
from queue import Queue
from sys import stdin, stdout
from collections import Counter
input = lambda : stdin.readline().strip()
fast_print = stdout.write
t = int(input())
for _ in range(t):
	n = input()
	ls = []
	for k in range(len(n)):
		temp = str(n[k]) + '0' * (len(n) - k - 1)
		if int(temp) != 0:
			ls.append(temp)
	fast_print(str(len(ls)) + '\n')
	for i in ls:
		fast_print(i + ' ')
	fast_print('\n')


import math
t = int(input())
for z in range(t):
	n = int(input())
	res = []
	i = 0
	while n > 0:
		p = n % 10
		n = int(n / 10)
		if p != 0:
			res.append(p * 10 ** i)
		i += 1
	print(len(res))
	for i in res:
		print(i, end=' ')
	print()


n = int(input())
a = []
for i in range(n):
	a.append(int(input()))
for i in a:
	s = 0
	res = 0
	q = 10
	result = []
	for j in range(len(str(i))):
		res = i % q
		i = i - res
		if res != 0:
			s += 1
			result.append(res)
		q *= 10
	print(s)
	print(*result, sep=' ')


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


t = int(input())
for x in range(t):
	s = input()
	s = s[::-1]
	i = 0
	li = []
	for word in s:
		if 1 <= int(word) <= 9:
			if i == 0:
				li.append(int(word))
			else:
				li.append(int(word) * 10 ** i)
		i += 1
	print(len(li))
	for item in li:
		print(item, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	dec = 1
	cnt = 0
	ans = ''
	while dec <= n:
		tmp = n % (dec * 10)
		if tmp != 0:
			cnt += 1
			ans += str(tmp) + ' '
		n -= tmp
		dec *= 10
	print(cnt)
	print(ans)


for _ in range(int(input())):
	n = int(input())
	c = len(str(n))
	n1 = str(n)
	p = -1
	count = 0
	if c == 1:
		print(1)
		print(n)
	else:
		for i in range(len(n1) - 1):
			if n1[p] == '0':
				count = count + 1
			p = p - 1
		if count == c - 1:
			print(1)
			print(n)
		else:
			print(c - count)
			d = 1
			while n != 0:
				z = n % 10
				if z != 0:
					print(z * d, end=' ')
				n = n // 10
				d = d * 10
		print()


for t in range(int(input())):
	n = list(input())
	answer = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		else:
			answer.append(int(n[i]) * 10 ** (len(n) - i - 1))
	print(len(answer))
	print(*answer)


for _ in range(int(input())):
	n = int(input())
	if n <= 10:
		print(1)
		print(n)
	else:
		ls = []
		ss = str(n)
		ln = len(ss)
		for i in range(0, ln):
			val = int(ss[i]) * 10 ** (ln - i - 1)
			if val != 0:
				ls.append(val)
		print(len(ls))
		print(*ls)


for _ in range(int(input())):
	n = int(input())
	s = str(n)
	if len(s) == 1:
		print(1)
		print(n)
	elif s[1:] == ['0'] * (n - 1):
		print(1)
		print(n)
	else:
		x = len(s)
		i = x - 1
		p = []
		l = 0
		while n > 0 and i >= 0:
			if n >= pow(10, i):
				y = n // pow(10, i)
				n -= y * pow(10, i)
				l += 1
				p.append(y * pow(10, i))
			i -= 1
		print(l)
		for i in p:
			print(i, end=' ')
		print()


t = int(input())
while t != 0:
	n = int(input())
	nStr = str(n)
	count = 0
	ans = []
	for i in range(len(nStr) - 1, -1, -1):
		tmp = nStr[i]
		if tmp != '0':
			count += 1
			toAdd = int(tmp) * 10 ** (len(nStr) - i - 1)
			ans.append(toAdd)
	print(count)
	print(*ans, sep=' ')
	t -= 1


def solve():
	n = input()
	l = len(n)
	i = 0
	a = []
	while i != l:
		a.append(int(n[i]) * 10 ** (l - i - 1))
		i += 1
	a = [i for i in a if i != 0]
	print(len(a))
	return ' '.join(map(str, a))
t = int(input())
for i in range(t):
	print(solve())


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


for case in range(int(input())):
	n = int(input())
	ans = []
	k = 1
	while n:
		if n % 10:
			ans.append(n % 10 * k)
		n //= 10
		k *= 10
	print(len(ans))
	print(' '.join(list(map(str, ans))))


t = int(input())
for i in range(t):
	n = int(input())
	k = 0
	x = ''
	if n % 10 > 0:
		k += 1
		x += str(n % 10) + ' '
	if n % 100 // 10 > 0:
		k += 1
		x += str(n % 100 // 10 * 10) + ' '
	if n % 1000 // 100 > 0:
		k += 1
		x += str(n % 1000 // 100 * 100) + ' '
	if n // 1000 > 0:
		k += 1
		x += str(n // 1000 * 1000) + ' '
	print(k)
	print(x)


for i in range(int(input())):
	s = input()
	if len(s) == 1:
		print(1)
		print(s[0])
	else:
		count = 0
		temp = ''
		x = 0
		l = 0
		for j in range(len(s)):
			if s[j] != '0':
				count += 1
		print(count)
		for j in range(len(s)):
			if s[j] != '0':
				l = len(s) - j - 1
				x = int(s[j]) * pow(10, l)
				print(x, end=' ')
		print()


import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
t = int(input())
for _ in range(t):
	n = input()
	a = len(n)
	count = 0
	for i in n:
		if i != '0':
			count += 1
	print(count)
	for i in range(a):
		if n[i] != '0':
			print(n[i] + '0' * (a - i - 1), end=' ')
	print()


ZERO = '0'
numbers_count = int(input())
numbers = [input() for i in range(0, numbers_count)]
for number in numbers:
	terms = []
	number_len = len(number)
	for digit in number:
		number_len -= 1
		if digit == ZERO:
			continue
		terms.append(f'{digit}{ZERO * number_len}')
	print(len(terms))
	print(' '.join(terms))


for i in range(int(input())):
	s = 0
	a = int(input())
	c = str(a)
	b = len(c)
	for i in c:
		if i != '0':
			s = s + 1
	print(s)
	for i in range(b):
		if c[i] != '0':
			print(int(c[i]) * 10 ** (b - i - 1), end=' ')
	print(' ')


for _ in [0] * int(input()):
	num = input()
	m = len(num)
	l = []
	for i in range(m):
		if num[i] != '0':
			l += [num[i] + '0' * (m - 1 - i)]
	print(len(l))
	print(*l)


t = int(input())
for _ in range(t):
	n = input()
	r = ''.join(reversed(n))
	f = 0
	l = []
	for i in range(len(r)):
		if r[i] != '0':
			f += 1
			l.append(int(r[i]) * 10 ** i)
	print(f)
	print(*l)


def get_input():
	return list(map(int, input().split(' ')))
t = get_input()[0]
for i in range(t):
	n = input()
	n = list(n)
	l = 0
	ans = ''
	for j in range(len(n)):
		if n[j] != '0':
			l += 1
			ans += n[j] + '0' * (len(n) - j - 1) + ' '
	print(l)
	print(ans[0:-1])


t = int(input())
for i in range(t):
	b = []
	a = input()
	b += list(a)
	b.reverse()
	mi = 0
	for j in range(len(a)):
		if b[j] != '0':
			mi += 1
	print(mi)
	n = len(a)
	for j in range(len(a)):
		if a[j] != '0':
			print(a[j] + '0' * (n - j - 1))


t = int(input())
for _ in range(t):
	n = int(input())
	k = len(str(n))
	for x in str(n):
		if x == '0':
			k -= 1
	print(k)
	out = []
	for x in range(len(str(n))):
		if str(n)[x] != '0':
			out.append(str(n)[x] + (len(str(n)[x:]) - 1) * '0')
	outstr = ''
	for i in out:
		outstr += i + ' '
	print(outstr)


for t in range(int(input())):
	n = input()
	v = [d + '0' * (len(n) - i - 1) for (i, d) in enumerate(n) if d != '0']
	print(len(v), ' '.join(v), sep='\n')


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


for i in range(int(input())):
	ar = []
	n = int(input())
	l = len(str(n))
	while l > 1:
		temp = int(str(n)[0] + '0' * (l - 1))
		n = str(n)[1:]
		l -= 1
		ar.append(temp)
	ar.append(int(n))
	ar = list(filter(lambda n: n > 0, ar))
	print(len(ar))
	print(*ar)


t = int(input())
while t:
	n = int(input())
	l = []
	a = n
	while a != 0:
		l.append(a % 10)
		a = a // 10
	if sum(l) == l[-1]:
		print(1)
		print(n)
	else:
		k = 0
		s = ''
		for i in range(len(l)):
			if l[i] != 0:
				k += 1
				b = l[i] * pow(10, i)
				s += str(b) + ' '
		print(k)
		print(s)
	t -= 1


def solve(number):
	(res, pow10) = ([], len(number) - 1)
	for n in number:
		val = int(n) * 10 ** pow10
		if val:
			res.append(val)
		pow10 -= 1
	print(len(res))
	print(' '.join((str(x) for x in res)))
for _ in range(int(input())):
	solve(input())


cases = int(input())

def expand(number):
	numbers = []
	for a in range(len(number)):
		numbers.append(number[a] + '0' * len(number[a + 1:]))
		try:
			numbers.remove('0' * len(number[a:]))
		except:
			1 == 1
	return numbers
for i in range(cases):
	num = input()
	final = expand(num)
	final2 = ''
	for i in range(len(final)):
		final2 = final2 + final[i] + ' '
	print(len(final))
	print(final2)


for _ in range(int(input())):
	n = list(input())
	for i in range(len(n)):
		n[i] = int(n[i])
	if len(n) == 1:
		print(1)
		print(n[0])
	else:
		p = n.count(0)
		b = []
		print(len(n) - p)
		for i in range(len(n)):
			if n[i] != 0:
				b.append(n[i] * 10 ** (len(n) - i - 1))
		print(*b)


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


from collections import *
import sys

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))
t = ri()
for _ in range(t):
	n = [int(x) for x in input()]
	n = n[::-1]
	ans1 = 0
	ans2 = []
	for i in range(len(n)):
		if n[i] != 0:
			ans1 += 1
			ans2.append(n[i] * pow(10, i))
	print(ans1)
	print(*ans2)


for _ in range(int(input())):
	n = int(input())
	d = 1
	result = []
	while n > 0:
		res = n % 10 * d
		if res != 0:
			result.append(res)
		n = int(n / 10)
		d *= 10
	print(len(result))
	for j in range(len(result) - 1):
		print(end=str(result[j]) + ' ')
	print(result[len(result) - 1])


for _ in range(int(input())):
	n = list(input())
	l = list()
	for i in range(len(n) - 1, -1, -1):
		if n[i] != '0':
			l.append(n[i:len(n)])
			n[i] = '0'
	res = [''.join(ele) for ele in l]
	print(len(res))
	print(*res)


t = int(input())
entry = []
for case in range(t):
	entry.append(input())
for number in entry:
	summands = 0
	factors = list(number.strip())
	new_factors = []
	for index in range(len(factors)):
		if factors[index] != '0':
			summands += 1
			new_factors.append(int(factors[index]) * 10 ** (len(factors) - index - 1))
	print(summands)
	for integer in new_factors:
		if integer == new_factors[-1]:
			print(integer)
		else:
			print(integer, end=' ')


test = int(input())
for i in range(test):
	userinput = input()
	count = len(userinput)
	newlist = []
	for x in userinput:
		if int(x) * pow(10, count - 11) != 0:
			newlist.append(int(x) * pow(10, count - 1))
		count -= 1
	print(len(newlist))
	for x in newlist:
		print(x, end=' ')


t = int(input())
for i in range(t):
	n = input()
	cur_n = int(n)
	si = len(n)
	c = 0
	l = []
	for i in range(si):
		if n[i] == '0':
			continue
		ans = n[i]
		ans = int(ans) * 10 ** (si - 1 - i)
		l.append(ans)
		c = c + 1
	print(c)
	for i in l:
		print(i, end=' ')
	print()


n = int(input())
for i in range(n):
	text = input()
	a = len(text)
	z = ''
	t = 0
	for j in range(a, 0, -1):
		if text[a - j] != '0':
			t += 1
			z = text[a - j] + '0' * (j - 1) + ' ' + z
	print(t)
	print(z)


import math
for _ in range(int(input())):
	n = int(input())
	l = len(str(n))
	i = 0
	a = []
	while i <= l:
		r = n % 10
		a.append(int(r * math.pow(10, i)))
		n = n // 10
		i += 1
	p = set(a)
	a = list(p)
	a.remove(0)
	print(len(a))
	for i in range(len(a)):
		if i == len(a) - 1:
			print(a[i])
		else:
			print(a[i], end=' ')


for j in range(int(input())):
	n = int(input())
	s = str(n)
	l = []
	for i in range(len(s)):
		t = 10 ** (len(s) - i - 1) * int(s[i])
		if t != 0:
			l.append(str(t))
	h = ' '.join(l)
	print(len(l))
	print(h)


T = int(input())
for tc in range(T):
	n = int(input())
	res = []
	i = 1
	while n > 0:
		d = n % 10
		if d != 0:
			res.append(d * i)
		n = n // 10
		i = i * 10
	print(len(res))
	print(*res)


from math import *
mod = 10 ** 9 + 7

def _in():
	return [int(x) for x in input().split(' ')]

def main():
	n = input()
	ans = []
	for i in range(len(n)):
		if n[i] != '0':
			ans.append(int(n[i]) * 10 ** (len(n) - i - 1))
	print(len(ans))
	for i in ans:
		print(i)
for _ in range(int(input())):
	main()


for i in range(int(input())):
	n = int(input())
	l = []
	for i in range(1, len(str(n)) + 1):
		if n < 10:
			l.append(n)
		elif str(n).count('0') == len(str(n)) - 1:
			l.append(n)
			break
		else:
			a = n % 10 ** i
			if a > 0:
				l.append(a)
				n -= a
	print(len(l))
	print(' '.join(map(str, l)))


from math import *
from copy import *
from string import *
from random import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math

def bin1(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = k ** mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin1(mid + 1, r, k, t, b, val, ans)
		else:
			return bin1(l, mid - 1, k, t, b, val, ans)

def bin2(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = t * k ** mid + b * mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin2(l, mid - 1, k, t, b, val, ans)
		else:
			return bin2(mid + 1, r, k, t, b, val, ans)

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	l = []
	for i in range(2, n + 1):
		if prime[i]:
			l.append(i)
	return l

def bin(l, r, ll, val):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		if val >= ll[mid][0] and val <= ll[mid][1]:
			return mid
		elif val < ll[mid][0]:
			return bin(l, mid - 1, ll, val)
		else:
			return bin(mid + 1, r, ll, val)

def deci(n):
	s = ''
	while n != 0:
		if n % 2 == 0:
			n = n // 2
			s = '0' + s
		else:
			n = n // 2
			s = '1' + s
	return s

def diff(s1, s2):
	if len(s1) < len(s2):
		v = len(s1)
		while v != len(s2):
			s1 = '0' + s1
			v = v + 1
	else:
		v = len(s2)
		while v != len(s1):
			s2 = '0' + s2
			v = v + 1
	c = 0
	for i in range(len(s1)):
		if s1[i:i + 1] != s2[i:i + 1]:
			c = c + 1
	return c
from sys import stdin, stdout

def fac(a, b):
	v = a
	while a != b:
		v *= a - 1
		a = a - 1
	return v

def bino(l, r, n):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		val1 = math.log(n / mid + 1, 2)
		val2 = int(val1)
		if val1 == val2:
			return val1
		elif val1 < 1.0:
			return bino(l, mid - 1, n)
		else:
			return bino(mid + 1, r, n)

def binary(l, r, val, ans):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		v = val ** 5 - mid ** 5
		print(v)
		if v == ans:
			print('HOHOHOH')
			return mid
		elif v < ans:
			return binary(mid + 1, r, val, ans)
		else:
			return binary(l, mid - 1, val, ans)

def check(n):
	v = 1
	while n != 0:
		if n % 10 == 0 or n % 10 == 1:
			n = n // 10
		else:
			v = 0
			break
	return v

def stairs(n, m, val, c, l):
	if val > n:
		return 100000
	elif val == n:
		if l[val] != -1:
			return l[val]
		elif c % m == 0:
			l[val] = c
			return l[val]
		else:
			l[val] = 100000
			return l[val]
	else:
		l[val] = min(stairs(n, m, val + 1, c + 1, l), stairs(n, m, val + 2, c + 1, l))
		return l[val]

def fact(n):
	if n == 0 or n == 1:
		return 1
	else:
		return n * fact(n - 1)

def some(n):
	s = 0
	while n != 0:
		s += fact(n % 10)
		n //= 10
	return s

def bin(l, r, val, ll):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		print(ll[mid])
		if ll[mid] == val:
			return mid
		elif ll[mid] > val:
			return bin(l, mid - 1, val, ll)
		else:
			return bin(mid + 1, r, val, ll)
t = int(input())
for i in range(t):
	n = int(input())
	if n < 10:
		print(1)
		print(n)
	else:
		l = []
		c = 0
		while n != 0:
			if n % 10 != 0:
				l.append(n % 10 * 10 ** c)
			c += 1
			n = n // 10
		l1 = []
		for j in range(len(l)):
			l1.append(l[len(l) - j - 1])
		print(len(l1))
		print(*l1)


t = int(input())
for i in range(t):
	n = input()
	k = len(n)
	rez = []
	for j in range(k):
		if n[j] == '0':
			continue
		rez.append(n[j] + '0' * (k - j - 1))
	print(len(rez))
	print(*rez)


for _ in range(int(input())):
	n = input()
	(k, cnt, res) = (1, 0, [])
	for i in range(len(n)):
		if n[i] != '0':
			ans = str(n[i])
			for _ in range(len(n) - k):
				ans += '0'
			res.append(ans)
			cnt += 1
		k += 1
	print(cnt)
	for i in res:
		print(i, end=' ')
	print()


ans = []
for _ in range(int(input())):
	num = input()
	l = len(num)
	tmp = set()
	for i in range(l):
		if int(num[i]):
			tmp.add(num[i] + '0' * (l - 1 - i))
	ans.extend((len(tmp), ' '.join(tmp)))
for a in ans:
	print(a)


def main():
	T = int(input())
	for i in range(1, T + 1):
		m = input()
		n = int(m)
		result = []
		for j in range(1, len(m) + 1):
			if n % 10 ** j:
				result.append(n % 10 ** j)
				n -= n % 10 ** j
		print(len(result))
		result = [str(r) for r in result]
		print(' '.join(result))
main()


t = int(input())
for i in range(t):
	n = input()
	n_len = len(n)
	a = []
	for i in range(n_len):
		x = int(n[i]) * 10 ** (n_len - i - 1)
		if x > 0:
			a.append(x)
	print(len(a))
	print(*a)


a = input()
ans = []
for i in range(int(a)):
	n = input()
	ans.clear()
	for c in n:
		for d in range(len(ans)):
			ans[d] += '0'
		if c != '0':
			ans.append(c)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	cnt = 1
	l = []
	while n:
		rem = n % 10
		if rem >= 1 and rem <= 9:
			l.append(rem * cnt)
		cnt = cnt * 10
		n = n // 10
	print(len(l))
	for i in range(len(l)):
		print(l[i], end=' ')
	print()


def sol(n):
	l = [l for l in str(n)]
	fl = []
	zr = len(l) - 1
	for num in l:
		if num == '0':
			zr -= 1
			continue
		else:
			fl.append(int(num + '0' * zr))
			zr -= 1
	print(len(fl))
	print(*fl)
t = int(input())
for i in range(t):
	n = int(input())
	sol(n)


A = []
for i in range(int(input())):
	a = str(input())
	for i in range(len(a)):
		x = str(a[i] + '0' * (len(a) - i - 1))
		if int(x) <= 0:
			pass
		else:
			A.append(x)
	print(len(A))
	print(*A)
	A.clear()


def solve():
	n = int(input())
	e = []
	for i in range(0, len(str(n)) - 1):
		if str(n)[i] != '0':
			e.append(str(n)[i] + '0' * (len(str(n)) - i - 1))
	if str(n)[-1] != '0':
		e.append(str(n)[-1])
	return str(len(e)) + '\n' + ' '.join(e)
t = int(input())
ans = []
while t:
	ans.append(str(solve()))
	t -= 1
print('\n'.join(ans))


import math

def expanded_form(num):
	a = []
	number = num
	while number != 0:
		(number, rem) = divmod(number, 10)
		a.append(rem)
	a.reverse()
	b = []
	counter = len(a)
	for n in a:
		b.append(n * 10 ** (counter - 1))
		counter -= 1
	for num in b:
		if num != 0:
			r.append(num)
	return ' + '.join([str(num) for num in b if num != 0])
for i in range(int(input())):
	num = int(input())
	r = []
	k = expanded_form(num)
	print(len(r))
	for i in r:
		print(i, end=' ')
	print('\r')


n = int(input())
for i in range(n):
	integer = int(input())
	zeros = 0
	while integer % 10 == 0:
		integer //= 10
		zeros += 1
	primes = []
	minus = 0
	while integer != 0:
		result = integer % 10
		integer //= 10
		if result != 0:
			primes.append(result * 10 ** minus)
		minus += 1
	primes = [prime * 10 ** zeros for prime in primes]
	k = len(primes)
	print(k)
	s = str(primes[0])
	for x in primes[1:]:
		s += ' ' + str(x)
	print(s)


for _ in range(int(input())):
	n = int(input())
	cnt = 0
	a = []
	while n > 0:
		x = n % 10
		n //= 10
		if x == 0:
			cnt += 1
			continue
		a.append(x * 10 ** cnt)
		cnt += 1
	print(len(a))
	print(*a)


testcases = int(input())
for i in range(testcases):
	n = input()
	n = list(n)
	count = 0
	ans = []
	for i in range(len(n)):
		if int(n[i]) > 0:
			count += 1
			ans.append(n[i] + '0' * (len(n) - i - 1))
	print(count)
	print(*ans)


n = int(input())
for x in range(n):
	num = int(input())
	strnum = str(num)
	l = len(strnum)
	numbers = []
	isround = False
	if num % 10 ** (l - 1) == 0:
		isround = True
	i = 1
	while isround == False and i < l:
		t = num % 10 ** i
		if t != 0:
			numbers.append(t)
			num -= t
		i += 1
		if num % 10 ** (l - 1) == 0:
			isround = True
	numbers.append(num)
	print(len(numbers))
	for j in numbers:
		print(j, end=' ')
	print()


n = int(input())
for i in range(n):
	t = input()
	s = 0
	a = []
	for j in range(len(t)):
		if t[j] == '0':
			pass
		else:
			a.append(t[j] + '0' * (len(t) - j - 1))
			s += 1
	print(s)
	for j in a:
		print(j, end=' ')
	print()


n = int(input())
for i in range(n):
	m = int(input())
	j = 0
	k = len(str(m))
	prev = m
	a = []
	while j < k:
		if len(str(m)) != 1 and m != 0:
			f = int(m / 10 ** (len(str(m)) - 1))
			a.append(f * 10 ** (len(str(m)) - 1))
			m = m - f * 10 ** (len(str(m)) - 1)
		else:
			if m != 0:
				a.append(m)
			break
	print(len(a))
	print(' '.join(map(str, a)))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
testcases = int(input())
for j in range(testcases):
	n = input()
	outy = []
	for s in range(len(n)):
		val = n[s]
		if val != '0':
			item = val
			for k in range(len(n) - 1 - s):
				item += '0'
			outy.append(item)
	print(len(outy))
	print(' '.join(outy))


def value(lw):
	str2 = ''
	for x in range(lw - 1):
		str2 += '0'
	return str2
n = input()
import math
for x in range(int(n)):
	val = input()
	arr = []
	while len(val) != 1:
		tik = value(len(val))
		div = '1' + tik
		f = str(int(int(val) / int(div))) + tik
		arr.append(f)
		val2 = int(val) % int(div)
		val = str(val2)
	if val != '0':
		arr.append(val)
	print(len(arr))
	for nn in arr:
		print(nn, end=' ')
	print()


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


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


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


t = int(input())
for _ in range(t):
	n = int(input())
	z = str(n)
	l = len(z)
	num = 10 ** (l - 1)
	if n > 9:
		if n / num == 1.0 or n / num == 2.0 or n / num == 3.0 or (n / num == 4.0) or (n / num == 5.0) or (n / num == 6.0) or (n / num == 7.0) or (n / num == 8.0) or (n / num == 9.0):
			print(1)
			print(n)
		else:
			lis = list(z)
			c = 0
			my = []
			for i in range(len(lis)):
				if lis[i] != '0':
					c += 1
					s = lis[i] + '0' * (len(lis) - i - 1)
					my.append(s)
			print(c)
			for ch in my:
				print(ch, end=' ')
			print()
	else:
		print(1)
		print(n)


import sys
t = int(input())
for j in range(t):
	ans = []
	s = str(input())
	n = len(s)
	for i in range(n):
		if ord(s[i]) >= ord('1') and ord(s[i]) <= ord('9'):
			t = str(s[i])
			t = t + (n - 1 - i) * str('0')
			ans.append(t)
	print(len(ans))
	for i in range(len(ans)):
		print(ans[i], end=' ')
	print()


for t in range(int(input())):
	ans = []
	digit = 1
	n = int(input())
	while n > 0:
		if n % 10 != 0:
			ans.append(n % 10 * digit)
		n = n // 10
		digit *= 10
	print(len(ans))
	print(*ans)


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


for i in range(int(input())):
	a = input()
	a = list(a)
	a.reverse()
	arr = []
	i = 0
	while i < len(a):
		if a == '0':
			pass
		else:
			arr.append(int(a[i]) * 10 ** i)
		i += 1
	x = [0]
	res = [i for i in arr if i not in x]
	print(len(res))
	for j in range(len(res)):
		print(res[j], end=' ')


for i in range(int(input())):
	rd = [x for x in input()]
	whole = []
	count = -1
	for i in rd[::-1]:
		count += 1
		if int(i):
			whole.append(i + '0' * count)
	print(len(whole))
	for i in whole:
		print(int(i), end=' ')


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


def next(n):
	arr = []
	n = str(n)
	l = len(n)
	for i in range(l):
		if int(n[i]) != 0:
			arr.append(n[i] + '0' * (l - i - 1))
	print(len(arr))
	for i in arr:
		print(i, end=' ')
	print()
	return
n = int(input())
for i in range(n):
	next(int(input()))


def digit(x):
	res = []
	digits = []
	while x > 0:
		digits.append(x % 10)
		x = x // 10
	for i in range(len(digits)):
		if digits[i] != 0:
			res.append(digits[i] * 10 ** i)
	print(len(res))
	for i in reversed(res):
		print(i, end=' ')
	print('')
cases = int(input())
while cases > 0:
	cases -= 1
	n = int(input())
	digit(n)


x = int(input())
for i in range(0, x):
	j = int(input())
	a = []
	p = 1
	while j != 0:
		r = j % 10 ** p
		if r != 0:
			a.append(r)
			j = j - r
		p = p + 1
	print(len(a))
	for m in range(0, len(a)):
		print(a[m], end=' ')


for i in range(int(input())):
	a = int(input())
	b = []
	for j in range(len(str(a))):
		if str(a)[j] == '0':
			continue
		b.append(str(a)[j] + '0' * (len(str(a)) - 1 - j))
	print(len(b))
	print(*b)


for size in range(int(input())):
	arr = input()
	brr = ''
	count = 0
	n = len(arr)
	for i in range(n):
		if arr[i] != '0':
			count += 1
			brr += arr[i]
			for x in range(n - i - 1):
				brr += '0'
			if i != n - 1:
				brr += ' '
	print(count)
	print(brr)


t = int(input())
while t > 0:
	n = int(input())
	m = n
	lst = list()
	cnt = 0
	while m > 0:
		r = m % 10
		if r != 0:
			lst.append(int(r) * int(pow(10, cnt)))
		m = m // 10
		cnt += 1
	print(len(lst))
	for i in lst:
		print(i, end=' ')
	print()
	t -= 1


import sys
import math
from collections import Counter, defaultdict
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass

def takeInput():
	return [int(x) for x in input().strip().split()]
t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	rounds = []
	pow10 = 1
	while n:
		d = n % 10
		if d != 0:
			rounds.append(pow10 * d)
		pow10 *= 10
		n //= 10
	print(len(rounds))
	print(*rounds)


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


T = int(input())
while T:
	n = input()
	d = len(n)
	X = []
	for i in range(d):
		if n[i] != '0':
			X.append(int(n[i] + '0' * (d - i - 1)))
	print(len(X))
	print(*X)
	T = T - 1


from collections import defaultdict
con = 10 ** 9 + 7
INF = float('inf')

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

def main():
	N = int(input())
	for i in range(N):
		t = input()
		M = len(t)
		ans = []
		for j in range(M):
			if t[-1 - j] != '0':
				ans.append(int(t[-1 - j]) * 10 ** j)
		print(len(ans))
		print(*ans)
main()


def round(n):
	n = str(n)
	k = len(n)
	array = []
	for i in range(k):
		zeros = '0' * (k - i - 1)
		if int(n[i] + zeros) != 0:
			array.append(int(n[i] + zeros))
	print(len(array))
	print(*array)
t = int(input())
for i in range(t):
	num = int(input())
	round(num)


n = int(input())
for i in range(n):
	a = int(input())
	s = str(a)
	k = len(s)
	ans_1 = k - s.count('0')
	print(ans_1)
	spis = []
	for j in range(k):
		if s[j] != '0':
			ans = int(s[j])
			spis.append(ans * 10 ** (k - j - 1))
	for k in spis:
		print(k, end=' ')


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	v = []
	n = int(input())
	p = 1
	while n:
		if n % 10:
			v += (n % 10 * p,)
		n //= 10
		p *= 10
	print(len(v))
	print(*v)


t = int(input())
for j in range(t):
	a = str(input())
	l = len(a)
	ns = []
	num_not_zero = 0
	for i in range(l):
		if a[i] is not '0':
			num_not_zero += 1
			if i != l - 1:
				ns.append(int(a[i]) * 10 ** (l - i - 1))
			else:
				ns.append(int(a[i]))
	print(num_not_zero)
	for k in ns:
		print(k, end=' ')


n = int(input())
for i in range(n):
	x = input()
	if len(x) == 1:
		print(1)
		print(x)
	else:
		no = 0
		l = ''
		for i in range(len(x)):
			if x[i] != '0':
				no += 1
				l = l + x[i] + '0' * (len(x) - (i + 1)) + ' '
		print(no)
		print(l)


test = int(input())
while test > 0:
	n = input()
	length = len(n)
	lst = list()
	for i in range(length):
		if not int(n[i]) > 0:
			continue
		number = int(n[i]) * pow(10, length - i - 1)
		lst.append(number)
	print(len(lst))
	print(*lst)
	test = test - 1


t = int(input())
for ii in range(t):
	astr = input()
	output = None
	count = 0
	h = len(astr) - 1
	for i in astr:
		if i != '0':
			count = count + 1
			x = str(int(i) * 10 ** h)
			if output is None:
				output = x
			else:
				output = output + ' ' + x
		h = h - 1
	print(count)
	print(output)


t = int(input())
for i in range(t):
	x = int(input())
	ans = []
	p = 1
	while x > 0:
		y = x % 10
		if y != 0:
			ans.append(y * p)
		p *= 10
		x = x // 10
	print(len(ans))
	for i in range(len(ans) - 1):
		print(ans[i], end=' ')
	print(ans[-1])


for i in range(0, int(input())):
	n = int(input())
	p = 1
	list = []
	while n:
		if n % 10:
			list.append(n % 10 * p)
		p *= 10
		n = int(n / 10)
	print(len(list))
	for i in list:
		print(f'{i} ', end=' ')


import sys
n = int(sys.stdin.readline())
for i in range(n):
	num = sys.stdin.readline().strip()
	tens = 10 ** (len(num) - 1)
	digits = []
	count = 0
	for digit in num:
		if digit != '0':
			digits.append(str(int(int(digit) * tens)))
			count += 1
		tens /= 10
	print(count)
	print(' '.join(digits))


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	res = []
	l = list(str(n))
	for i in range(len(l)):
		if l[i] != '0':
			res.append(int(l[i]) * 10 ** (len(l) - i - 1))
	print(len(res))
	print(*res)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def binary_search(lb, ub, val, cnt):
	mid = (lb + ub) // 2
	if val < mid:
		ub = mid - 1
		binary_search(lb, ub, val, cnt - 1)
	elif val > mid:
		lb = mid + 1
		binary_search(lb, ub, val, cnt - 1)
	else:
		print(cnt)

def abs(x):
	return x if x >= 0 else -x
for t in range(int(input())):
	n = int(input())
	li = []
	i = 0
	while n != 0:
		digit = n % 10
		if digit != 0:
			li.append(digit * 10 ** i)
		i += 1
		n = n // 10
	print(len(li))
	print(*li, sep=' ')


tc = int(input())
while tc:
	n = int(input())
	ans = []
	cn = 1
	while n:
		m = n % 10
		if m > 0:
			ans.append(m * cn)
		n = n // 10
		cn *= 10
	print(len(ans))
	print(*ans)
	tc -= 1


for x in range(int(input())):
	n = int(input())
	c = 0
	p = []
	if n == 1:
		print(n)
		print(n)
	else:
		while n >= 1:
			k = len(str(n))
			c += 1
			z = n // 10 ** (k - 1)
			p.append(z * 10 ** (k - 1))
			n = n % 10 ** (k - 1)
		print(c)
		print(*p)


n = int(input())
for i in range(n):
	num = int(input())
	num_arr = []
	num_len = len(str(num))
	while num_len > 0:
		num_len = len(str(num))
		if num_len == 1:
			if num != 0:
				num_arr.append(num)
			break
		num_int = num // 10 ** (num_len - 1) * 10 ** (num_len - 1)
		num_arr.append(num_int)
		num -= num_int
	print(len(num_arr))
	print(*num_arr)


t = int(input())

def solve():
	S = input()
	n = len(S)
	ans = []
	for (i, s) in enumerate(S):
		if int(s) != 0:
			ans.append(int(s) * 10 ** (n - i - 1))
	print(len(ans))
	print(*ans)
for i in range(t):
	solve()


t = int(input())
for tt in range(0, t):
	n = int(input())
	l = []
	temp = n
	i = 0
	while temp > 0:
		mod = temp % 10
		temp = temp // 10
		if mod != 0:
			l.append(mod * pow(10, i))
		i += 1
	print(len(l))
	for j in l:
		print(j, end=' ')
	print('')


import sys, math, cmath, time
start_time = time.time()
tt = 0

def inp():
	return int(input())

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

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def solve():
	n = inp()
	a = str(n)
	q = []
	for i in range(len(a)):
		if a[i] != '0':
			q.append(a[i] + '0' * (len(a) - i - 1))
	print(len(q))
	print(*q)

def main():
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
	sys.stdout.close()

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
	return q
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


def main():
	num_test_cases = int(input())
	output = ''
	for i in range(0, num_test_cases):
		test_case_str = input()
		test_case = int(test_case_str)
		if test_case < 10:
			output += f'1\n{test_case}\n'
			continue
		digits = len('%i' % test_case)
		number_of_sums = 0
		parts = []
		for t in range(0, digits):
			summand = int(test_case_str[t]) * pow(10, len('%i' % test_case) - 1)
			if summand != 0:
				parts.append(summand)
				number_of_sums += 1
				test_case -= summand
		output += str(len(parts)) + '\n' + ' '.join((str(n) for n in parts)) + '\n'
	print(output)
main()


t = int(input())
for _ in range(t):
	n = int(input())
	summands = []
	divisor = 1
	while n > 0:
		num = n % 10
		if num > 0:
			summands.append(num * divisor)
		n //= 10
		divisor *= 10
	print(len(summands))
	print(*reversed(summands))


TC = int(input())
for _ in range(TC):
	N = int(input())
	cnt = 10
	ret = []
	while N > 0:
		if N % cnt != 0:
			ret.append(N % cnt)
			N = N - N % cnt
		else:
			cnt = cnt * 10
	print(len(ret))
	for i in ret:
		print(i, end=' ')
	print()


for i in range(int(input())):
	l = list(input())
	k = len(l)
	print(k - l.count('0'))
	for i in range(k):
		num = k - i - 1
		if l[i] != '0':
			print(l[i] + '0' * num, end=' ')
	print(sep='\n')


for _ in range(int(input())):
	a = input()
	s = int('1' + (len(a) - 1) * '0')
	print(len(a) - a.count('0'))
	for i in a:
		if int(i) % 10 != 0:
			print(int(i) * s, end=' ')
		s //= 10


t = 1
t = int(input())

def solve():
	n = int(input())
	k = n
	p1 = 10
	l = []
	while p1 // 10 <= n:
		t = n % p1
		q = n % (p1 // 10)
		if t - q != 0:
			l.append(t - q)
		p1 *= 10
	ans = ' '.join([str(v) for v in l])
	print(len(l))
	print(ans)
for xx in range(t):
	solve()


t = int(input())
for i in range(t):
	n = input().strip()
	l = []
	for i in range(len(n)):
		s = n[i] + '0' * (len(n) - 1 - i)
		x = int(s)
		if x != 0:
			l.append(x)
	print(len(l))
	print(*l)


I = input
t = int(I())
for _ in range(t):
	n = list(I())
	k = len(n) - 1
	r = []
	for i in n:
		if i != '0':
			r.append(f"{i}{'0' * k}")
		k -= 1
	print(len(r))
	print(*r)


t = int(input())
data = []
for _ in range(t):
	ele = input()
	data.append(ele)
for num in data:
	print(len(num) - num.count('0'))
	count = len(num)
	for digit in num:
		if digit != '0':
			print(int(digit) * 10 ** (count - 1))
		count = count - 1


t = int(input())
for i in range(t):
	sn = input()
	l = len(sn)
	df = int(sn[0])
	number = int(sn)
	if False:
		pass
	else:
		c = 1
		makeup = []
		for j in sn:
			appender = int(j) * 10 ** (l - c)
			if appender != 0:
				makeup.append(appender)
			c += 1
		print(len(makeup))
		for k in makeup:
			print(k, end=' ')
		print()


t = int(input())
for i in range(t):
	n = list(input())
	i = 0
	y = []
	for j in range(len(n) - 1, -1, -1):
		y.append(int(n[j]) * 10 ** i)
		i = i + 1
	q = y.count(0)
	for j in range(q):
		y.remove(0)
	print(len(y))
	print(*y)


import sys
num_lines = int(input())
for i in range(num_lines):
	cont = 0
	resp = ''
	whole_number = sys.stdin.readline().strip('\n')
	length = len(whole_number) - 1
	for (idx, k) in enumerate(whole_number):
		if k != '0':
			cont += 1
			num = int(k) * 10 ** (length - idx)
			resp += f'{num} '
	print(cont)
	print(resp)


t = int(input())
for we in range(t):
	n = input()
	k = len(n)
	l = []
	for i in range(k):
		if n[i] != '0':
			y = n[i]
			for j in range(k - i - 1):
				y += '0'
			l.append(y)
	print(len(l))
	print(' '.join(l))


n = int(input())
L = []
for i in range(n):
	a = int(input())
	l = []
	p = 1
	while a > 0:
		if a % 10 != 0:
			l.append(a % 10 * p)
		a = int(a / 10)
		p *= 10
	L.append(l)
for item in L:
	print(len(item))
	for i in item:
		print(i, end=' ')
	print()


from pprint import pprint
import sys
q = int(input())
for _ in range(q):
	res = []
	s = input()
	l = len(s)
	for i in range(l):
		c = int(s[i])
		if c == 0:
			continue
		res.append(s[i] + '0' * (l - i - 1))
	print(len(res))
	print(' '.join(res))


import sys
t = int(input())
output = []
for i in range(t):
	num = int(input())
	if num < 10:
		output.append([num])
	else:
		power = 1
		factors = []
		while num:
			chopped = num % 10
			if chopped != 0:
				factors.append(chopped * power)
			num = int(num / 10)
			power *= 10
		output.append(factors)
for nums in output:
	print('%d' % len(nums))
	for num in nums:
		sys.stdout.write(str(num) + ' ')
	sys.stdout.flush()
	sys.stdout.write('\n')


for _ in range(int(input())):
	n = int(input())
	s = str(n)
	if s[0] != 0 and len(set(s[1:])) == 1 and (list(set(s[1:])) == '0'):
		print('1')
		print(n)
	else:
		l = []
		for i in range(len(s)):
			if s[i] == '0':
				pass
			else:
				l.append(s[i] + '0' * (len(s) - i - 1))
		print(len(l))
		print(*l)


import math

class RoundNumbers:

	def __init__(self, num):
		self.num = int(num)
		self.times = 0
		self.answer = []

	def findSumOfRoundNumbers(self):
		runningNumber = self.num
		index = 0
		while int(math.log10(self.num)) + 1 > index:
			remainder = runningNumber % 10
			runningNumber = int(runningNumber / 10)
			if remainder > 0:
				self.answer.append(remainder * pow(10, index))
				self.times = self.times + 1
			index = index + 1
		print(self.times)
		ans = ''
		for a in self.answer:
			ans = ans + str(a) + ' '
		print(ans)
numOfRecords = input()
numArr = []
for count in range(0, int(numOfRecords)):
	num = input()
	numArr.append(num)
for num in numArr:
	rn = RoundNumbers(num)
	rn.findSumOfRoundNumbers()


n = int(input())
for i in range(n):
	(cnt, p) = (0, 0)
	lst = []
	t = int(input())
	while t > 0:
		if t % 10 != 0:
			lst.append(t % 10 * 10 ** p)
			cnt += 1
		t = t // 10
		p += 1
	print(cnt)
	print(*lst, sep=' ')


for i in range(int(input())):
	num = input()
	arr = []
	if len(num) == 1:
		arr.append(num)
	else:
		for i in range(len(num)):
			if num[i] == '0':
				continue
			else:
				arr.append(int(num[i]) * 10 ** (len(num) - (i + 1)))
	print(len(arr))
	print(*arr)


def get_numbers(num):
	num = str(num)
	numbers = []
	if len(num) == 1:
		numbers.append(num)
	else:
		kr = num[0] + '0' * (len(num) - 1)
		new_num = int(num) - int(kr)
		if int(kr):
			numbers.append(kr)
		if new_num:
			numbers.extend(get_numbers(new_num))
	return numbers
n = int(input())
for _ in range(n):
	num = input()
	numbers = get_numbers(num)
	print(len(numbers))
	print(' '.join(numbers))


numTest = int(input())
for _ in range(numTest):
	thisStr = input()
	finalAns = []
	while True:
		thisLength = len(thisStr)
		thisUnit = 1
		for _ in range(thisLength - 1):
			thisUnit = thisUnit * 10
		thisAns = int(int(thisStr) / thisUnit)
		finalAns.append(thisAns * thisUnit)
		thisStr = str(int(thisStr) - thisAns * thisUnit)
		if thisStr == '0':
			break
	print(len(finalAns))
	finalAnsStr = ''
	for eachAns in finalAns:
		finalAnsStr = finalAnsStr + str(eachAns) + ' '
	finalAnsStr = finalAnsStr[0:len(finalAnsStr) - 1]
	print(finalAnsStr)


t = int(input())
e = 10 ** 9 + 7
for _ in range(t):
	s = input()
	k = 1
	l = []
	for i in range(len(s) - 1, -1, -1):
		if s[i] == '0':
			k = k * 10
		else:
			l.append(k * int(s[i]))
			k = k * 10
	print(len(l))
	print(*l)


t = int(input())
for _ in range(t):
	n = input()
	result = []
	count_zeros = pow(10, len(n) - 1)
	for digit in n:
		if digit is not '0':
			result.append(int(digit) * count_zeros)
		count_zeros //= 10
	print(len(result))
	for elem in result:
		print(elem, end=' ')
	print()


a = input()
s = []
for i in range(int(a)):
	s.append(input())
for i in s:
	count = 0
	l = len(i)
	for x in i:
		if x != '0':
			count += 1
	print(count)
	for x in range(len(i)):
		if i[x] == '0':
			continue
		else:
			print(i[x] + '0' * (l - x - 1), end=' ')
	print('')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	place = 0
	count = 0
	a = []
	while n > 0:
		r = int(n % 10)
		if not place == 0 and (not r == 0):
			a.append(r * 10 ** place)
			count += 1
		elif not r == 0:
			a.append(r)
			count += 1
		place += 1
		n = int(n // 10)
	print(count)
	for i in a:
		print(i, end=' ')
	print()


n = int(input())
for i in range(n):
	k = int(input())
	i = 1
	ar = []
	j = 0
	while k != 0:
		r = k % 10
		if r != 0:
			ar.append(r * i)
			j += 1
		i *= 10
		k = k // 10
	print(j)
	print(' '.join(map(str, ar)))


r = int(input())
for i in range(r):
	n = int(input())
	set1 = set()
	for i in range(1, len(str(abs(n))) + 1):
		temp = n % 10 ** i
		set1.add(temp)
		n = n - temp
	set1.discard(0)
	print(len(set1))
	for i in set1:
		print(i, end=' ')


for i in range(int(input())):
	n = int(input())
	k = 0
	dec = 1
	res = []
	while n > 0:
		digit = n % 10
		if digit > 0:
			res.append(digit * dec)
			k += 1
		dec *= 10
		n = n // 10
	print(k)
	print(*res)


def count1(n):
	n = str(n)
	ans = 0
	for i in range(len(n)):
		if n[i] != '0':
			ans += 1
	return ans
t = int(input())
for _ in range(t):
	n = int(input())
	ans1 = []
	if 1 <= n <= 10:
		print(1)
		print(n)
	else:
		for i in range(len(str(n))):
			if str(n)[i] == '0':
				continue
			else:
				pos = len(str(n)) - i
				if i == 0:
					count = pos - i - 1
				else:
					count = pos - 1
				ans1.append(str(n)[i] + '0' * count)
		print(count1(str(n)))
		print(*ans1)


t = int(input())
for test in range(t):
	n = input()
	num = list(n[:])
	arr = []
	j = len(num) - 1
	while j >= 0:
		if num[j] != '0':
			arr.append(int(''.join(map(str, num[j:]))))
			num[j] = '0'
		j -= 1
	print(len(arr))
	for i in range(len(arr) - 1, -1, -1):
		if i == 0:
			print(arr[i])
		else:
			print(arr[i], end=' ')


t = int(input())
for _ in range(t):
	a = int(input())
	d = 1
	k = 0
	s = ''
	while a > 0:
		if a % 10 > 0:
			s += str(a % 10 * d) + ' '
			k += 1
		d *= 10
		a //= 10
	print(k)
	print(s)


MOD = 10 ** 9 + 7
RLIMIT = 1000
DEBUG = 1

def main():
	for _ in inputt():
		(n,) = inputi()
		A = []
		i = -1
		while n:
			((n, x), i) = (divmod(n, 10), i + 1)
			if x:
				A.append(x * 10 ** i)
		print(len(A))
		print(*A)
from math import *
from heapq import *
from itertools import *
from functools import reduce, lru_cache, partial
from collections import Counter, defaultdict
import re, copy, operator, cmath
import sys, io, os, builtins
sys.setrecursionlimit(RLIMIT)
BUFSIZE = 8192

class FastIO(io.IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = io.BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(io.IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	if args:
		sys.stdout.write(str(args[0]))
		split = kwargs.pop('split', ' ')
		for arg in args[1:]:
			sys.stdout.write(split)
			sys.stdout.write(str(arg))
	sys.stdout.write(kwargs.pop('end', '\n'))

def debug(*args, **kwargs):
	if DEBUG and (not __debug__):
		print('debug', *args, **kwargs)
		sys.stdout.flush()
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip()
inputt = lambda t=0: range(t) if t else range(int(input()))
inputs = lambda : input().split()
inputi = lambda k=int: map(k, inputs())
inputl = lambda t=0, k=lambda : list(inputi()): [k() for _ in range(t)] if t else list(k())

def len(a):
	if isinstance(a, range):
		return -((a.start - a.stop) // a.step)
	return builtins.len(a)

def bisect_left(a, x, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	if key == None:
		key = do_nothing
	while lo < hi:
		mid = (lo + hi) // 2
		if key(a[mid]) < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def bisect_right(a, x, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	if key == None:
		key = do_nothing
	while lo < hi:
		mid = (lo + hi) // 2
		if x < key(a[mid]):
			hi = mid
		else:
			lo = mid + 1
	return lo

def insort_left(a, x, key=None, lo=0, hi=None):
	lo = bisect_left(a, x, key, lo, hi)
	a.insert(lo, x)

def insort_right(a, x, key=None, lo=0, hi=None):
	lo = bisect_right(a, x, key, lo, hi)
	a.insert(lo, x)
do_nothing = lambda x: x
bisect = bisect_right
insort = insort_right

def index(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	if key == None:
		key = do_nothing
	i = bisect_left(a, x, key, lo, hi)
	if lo <= i < hi and key(a[i]) == x:
		return a[i]
	if default != None:
		return default
	raise ValueError

def find_lt(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_left(a, x, key, lo, hi)
	if lo < i <= hi:
		return a[i - 1]
	if default != None:
		return default
	raise ValueError

def find_le(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_right(a, x, key, lo, hi)
	if lo < i <= hi:
		return a[i - 1]
	if default != None:
		return default
	raise ValueError

def find_gt(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_right(a, x, key, lo, hi)
	if lo <= i < hi:
		return a[i]
	if default != None:
		return default
	raise ValueError

def find_ge(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_left(a, x, key, lo, hi)
	if lo <= i < hi:
		return a[i]
	if default != None:
		return default
	raise ValueError

class Tree:

	def __init__(n):
		self._n = n
		self._conn = [[] for _ in range(n)]
		self._list = [0] * n

	def connect(a, b):
		pass

class Sieve:

	def __init__(self):
		self._n = 6
		self._list = [2, 3, 5, 7, 11, 13]

	def extend(self, n):
		if n <= self._list[-1]:
			return
		maxbase = int(n ** 0.5) + 1
		self.extend(maxbase)
		begin = self._list[-1] + 1
		newsieve = [i for i in range(begin, n + 1)]
		for p in self.primerange(2, maxbase):
			for i in range(-begin % p, len(newsieve), p):
				newsieve[i] = 0
		self._list.extend([x for x in newsieve if x])

	def extend_to_no(self, i):
		while len(self._list) < i:
			self.extend(int(self._list[-1] * 1.5))

	def primerange(self, a, b):
		a = max(2, a)
		if a >= b:
			return
		self.extend(b)
		i = self.search(a)[1]
		maxi = len(self._list) + 1
		while i < maxi:
			p = self._list[i - 1]
			if p < b:
				yield p
				i += 1
			else:
				return

	def search(self, n):
		if n < 2:
			raise ValueError
		if n > self._list[-1]:
			self.extend(n)
		b = bisect(self._list, n)
		if self._list[b - 1] == n:
			return (b, b)
		else:
			return (b, b + 1)

	def __contains__(self, n):
		if n < 2:
			raise ValueError
		if not n % 2:
			return n == 2
		(a, b) = self.search(n)
		return a == b

	def __getitem__(self, n):
		if isinstance(n, slice):
			self.extend_to_no(n.stop + 1)
			return self._list[n.start:n.stop:n.step]
		else:
			self.extend_to_no(n + 1)
			return self._list[n]
sieve = Sieve()

def isprime(n):
	if n <= sieve._list[-1]:
		return n in sieve
	for i in sieve:
		if not n % i:
			return False
		if n < i * i:
			return True
prime = sieve.__getitem__
primerange = lambda a, b=0: sieve.primerange(a, b) if b else sieve.primerange(2, a)

def factorint(n):
	factors = []
	for i in sieve:
		if n < i * i:
			break
		while not n % i:
			factors.append(i)
			n //= i
	if n != 1:
		factors.append(n)
	return factors
factordict = lambda n: Counter(factorint(n))
main()


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

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

def solve():
	n = read_int()
	answer = []
	power = 1
	while n != 0:
		if n % 10 != 0:
			answer.append(power * (n % 10))
		n //= 10
		power *= 10
	print(len(answer))
	print(' '.join(map(str, answer)))
T = read_int()
for _ in range(T):
	solve()


t = int(input())
for m in range(t):
	n = int(input())
	c = 0
	l = []
	i = 0
	while n != 0:
		d = n % 10
		if d != 0:
			c = c + 1
			l.append(d * 10 ** i)
		n = int(n / 10)
		i = i + 1
	print(c)
	for i in range(len(l) - 1, -1, -1):
		print(l[i], end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	acc = 0
	ans = []
	while n > 0:
		if n % 10 != 0:
			ans.append(n % 10 * 10 ** acc)
		acc += 1
		n = n // 10
	print(len(ans))
	for a in ans:
		print(a, end=' ')
	print()


total = int(input())
for i in range(total):
	numb = input()[::-1]
	roundNumbs = []
	for digit in range(len(numb)):
		if numb[digit] != '0':
			roundNumbs.append(numb[digit] + '0' * digit)
	print(len(roundNumbs))
	for number in roundNumbs:
		print(number, end=' ')
	print(end='\n')


def findRound(numStr):
	resArr = []
	for i in range(0, len(numStr)):
		if numStr[i] != '0':
			resArr.append(int(numStr[i] + '0' * (len(numStr) - 1 - i)))
	print(len(resArr), *resArr)
t = int(input())
for i in range(0, t):
	findRound(input())


t = int(input())
for i in range(t):
	n = int(input())
	A = []
	n = str(n)
	k = 1
	j = 0
	while j < len(n):
		if n[j] != '0':
			A.append(n[j] + '0' * (len(n) - k))
			k += 1
			j += 1
		else:
			j += 1
			k += 1
	print(len(A))
	print(*A)


t = int(input())
for _ in range(t):
	n = int(input())
	m = 1
	res = set()
	while n != 0:
		(n, num) = (n // 10, n % 10)
		if num != 0:
			res.add(num * m)
		m *= 10
	print(len(res))
	print(' '.join(map(str, res)))


t = int(input())
while t > 0:
	num = list(input())
	ans = []
	for (i, j) in enumerate(num[::-1]):
		if j != '0':
			ans.append(j + '0' * i)
	print(len(ans))
	print(' '.join(ans))
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	s = str(n)
	count = 0
	list1 = []
	for i in range(len(s)):
		if s[i] != '0':
			count = count + 1
			p = len(s) - i - 1
			list1.append(int(s[i]) * 10 ** p)
	print(count)
	for i in list(list1):
		print(i, end=' ')
	print()


def main(n):
	(ans, count) = ('', 0)
	numLen = len(n)
	for i in range(numLen):
		if n[i] != '0':
			ans += n[i] + '0' * (numLen - i - 1) + ' '
			count += 1
	return str(count) + '\n' + ans
for _ in range(int(input())):
	print(main(input()))


t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	a = []
	count = 0
	while n != 0:
		if n % 10 != 0:
			a.append(n % 10 * pow(10, count))
		n = n // 10
		count += 1
	print(len(a))
	for i in range(len(a)):
		print(a[i], end=' ')
	print()


t = int(input())
for i in range(t):
	a = input()
	b = len(a)
	j = 0
	c = []
	while True:
		if a[j] != '0':
			c.append(a[j] + '0' * (b - 1))
		if j == len(a) - 1:
			break
		j += 1
		b -= 1
	print(len(c))
	print(' '.join(c))


t = int(input())
while t != 0:
	n = int(input())
	mult = 0
	res = []
	while n != 0:
		digit = str(n % 10)
		num = digit + '0' * mult
		if int(num) != 0:
			res.append(num)
		n //= 10
		mult += 1
	print(len(res))
	for i in res:
		print(i, end=' ')
	print()
	t -= 1


t = int(input())
for _ in range(t):
	n = input()
	N = len(n)
	l = []
	for i in range(N):
		x = n[i] + '0' * (N - i - 1)
		if int(x) != 0:
			l.append(x)
	print(len(l))
	print(*l)


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		kap = int(input())
		res = []
		while kap != 0:
			lenk = len(str(kap))
			dd = kap // 10 ** (lenk - 1)
			res.append(10 ** (lenk - 1) * dd)
			kap = kap % 10 ** (lenk - 1)
		yield len(res)
		yield ' '.join((str(x) for x in res))
t = int(input())
ans = gift()
print(*ans, sep='\n')


t = int(input())
for num in range(0, t):
	n = int(input())
	x = n
	i = 1
	array = []
	while x > 0:
		if x % 10 ** i == 0:
			i = i + 1
		else:
			array.append(x % 10 ** i)
			x = x - x % 10 ** i
	print(len(array))
	print(*array)


n = int(input())
numbers = []
for i in range(n):
	numbers.append(int(input()))
count = []
for number in numbers:
	temp = []
	print(len(str(number)) - str(number).count('0'))
	if number % int(10) != int(0):
		temp.append(number % int(10))
	number = int(number / int(10))
	if number % int(10) != int(0):
		temp.append(number % int(10) * int(10))
	number = int(number / int(10))
	if number % int(10) != int(0):
		temp.append(number % int(10) * int(100))
	number = int(number / int(10))
	if number % int(10) != int(0):
		temp.append(number % int(10) * int(1000))
	number = int(number / int(10))
	if number % int(10) != int(0):
		temp.append(number % int(10) * int(10000))
	print(*temp, sep=' ')


inp = lambda : map(int, input().split())
t = int(input())
for i in range(t):
	n = int(input())
	count = 0
	(q, r) = (n, 0)
	l = []
	if n < 10:
		print(1)
		print(n)
		continue
	s = str(n)
	x = len(s) - 1
	for j in range(0, len(s)):
		if s[j] != '0':
			l.append(int(s[j]) * pow(10, x))
			x -= 1
		else:
			x -= 1
			continue
	print(len(l))
	print(*l)


for _ in range(int(input())):
	n = int(input())
	lenn = len(str(n))
	numbers = []
	iter = '10'
	for i in range(lenn):
		if n % int(iter) != 0:
			numbers.append(str(n % int(iter)))
			n -= n % int(iter)
		iter = iter + '0'
	print(len(numbers))
	print(' '.join(numbers))


def get_round_nums(num):
	string = str(num)
	ans = []
	n = len(string)
	for (index, char) in enumerate(string):
		if char != '0':
			ans.append(char + '0' * (n - index - 1))
	return ans
t = int(input())
for _ in range(t):
	num = int(input())
	nums = get_round_nums(num)
	print(len(nums))
	print(*nums)


t = int(input())
num = list()
for i in range(t):
	case = input()
	num.append(case)
for i in range(t):
	if num[i].count('0') == len(num[i]) - 1:
		print('1')
		print(num[i])
	else:
		k = len(num[i]) - num[i].count('0')
		print(k)
		x = len(num[i]) - 1
		y = 0
		while y <= len(num[i]) - 1:
			if num[i][y] != '0':
				if y != len(num[i]) - 1:
					print(num[i][y] + '0' * x, end=' ')
				else:
					print(num[i][y] + '0' * x)
			x -= 1
			y += 1


a = []
for _ in range(int(input())):
	b = []
	chislo = int(input())
	k = 10
	while chislo != 0:
		numb = chislo % k
		if numb != 0:
			b.append(str(numb))
		k = k * 10
		chislo = chislo - numb
	kol = str(len(b))
	a.append(kol)
	b = ' '.join(b)
	a.append(b)
print('\n'.join(a))


n = int(input())
num = []
sl = []
for i in range(n):
	a = input()
	v = []
	for j in range(len(a)):
		if a[j] != '0':
			v.append(a[j].ljust(len(a) - j, '0'))
	sl.append(len(v))
	num.append(v)
for i in range(n):
	print(sl[i])
	for j in num[i]:
		print(j, end=' ')
	print()


import sys
agGK = int(input())
for _ in range(agGK):
	s = str(input())
	p = []
	for i in range(len(s) - 1, -1, -1):
		if s[i] != '0':
			p.append(s[i] + '0' * (len(s) - 1 - i))
	print(len(p))
	for i in range(len(p)):
		print(p[i], end=' ')
	print()


n = int(input())
for it in range(n):
	a = []
	nol = 0
	num = int(input())
	while num >= 1:
		mod = num % 10
		if mod == 0:
			nol += 1
		a.append(mod)
		num //= 10
	print(len(a) - nol)
	for i in range(len(a)):
		if a[i] != 0:
			print(a[i] * 10 ** i, end=' ')
	print()


n = int(input())
for i in range(0, n):
	q = int(input())
	h = 10
	l = []
	while q > 0:
		r = q % h
		q = q - r
		if r > 0:
			l.append(r)
		h = h * 10
	print(len(l))
	print(*l)


def roundNumbers(n):
	result = []
	i = 1
	while n > 0:
		if n % 10 != 0:
			result.append(n % 10 * i)
		i *= 10
		n //= 10
	return result
for _ in range(int(input())):
	n = int(input())
	result = roundNumbers(n)
	print(len(result))
	print(*result)


def summands(num):
	if num[0] == 0 and num.count(num[0]) == len(num):
		print(1)
		print(num)
		return
	elif len(num) == 1:
		print(1)
		print(num)
		return
	ans = []
	for i in range(0, len(num)):
		if num[i] != '0':
			temp = num[i] + '0' * (len(num) - i - 1)
			ans.append(temp)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()

def main():
	t = int(input())
	for i in range(t):
		summands(input())
main()


def solve():
	n = input()
	n = list(n)
	ans = []
	for i in range(len(n)):
		if n[i] != '0':
			ans.append(int(n[i]) * 10 ** (len(n) - i - 1))
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print(end='\n')
T = 1
T = int(input())
for _ in range(1, T + 1):
	solve()


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


def main():
	t = int(input())
	while t != 0:
		x = int(input())
		mult = 1
		ans = []
		while x != 0:
			digit = x % 10
			if digit * mult != 0:
				ans.append(digit * mult)
			mult *= 10
			x //= 10
		print(len(ans))
		for i in ans:
			print(i, end=' ')
		print()
		t -= 1
main()


import sys
import math as mt

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def printwsp(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')

def printchk(*args):
	return print(*args, end='tst, ')
MOD = int(1000000000.0 + 7)
BABYMOD = 998244353
for _testcases_ in range(int(input())):
	n = int(input())
	i = 0
	li = list()
	while n:
		ab = n % 10 * pow(10, i)
		if ab:
			li.append(ab)
		i += 1
		n //= 10
	print(len(li))
	for i in li:
		printsp(i)
	print()


t = int(input())
for e in range(0, t):
	n = int(input())
	b = n
	m = 0
	l = []
	while b > 0:
		b = b // 10
		m += 1
	for i in range(0, m):
		if n % 10 > 0:
			l.append(n % 10 * 10 ** i)
		n = n // 10
	print(len(l))
	print(' '.join(map(str, l)))


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


def solve(n):
	ans = []
	l = len(n) - 1
	s = n[0] + l * '0'
	for i in n[1:]:
		l -= 1
		if i == '0':
			continue
		else:
			ans.append(s)
			s = i
			s += l * '0'
	if len(ans) == 0:
		ans.append(n)
	else:
		ans.append(s)
	print(len(ans))
	print(*ans, sep=' ')
t = int(input())
for _ in range(t):
	n = input().rstrip()
	solve(n)


def solve(p):
	alist = []
	for i in range(0, len(p)):
		atmp = ''
		if p[i] != '0':
			atmp += str(p[i])
			for j in range(0, len(p) - i - 1):
				atmp += '0'
			alist.append(atmp)
	print(len(alist))
	for i in range(0, len(alist)):
		print(alist[i], end=' ')
	print()
N = int(input())
for _ in range(0, N):
	k = input()
	solve(k)


test_cases = int(input())
for i in range(test_cases):
	number = input()
	addends = []
	for i in range(len(number)):
		addends.append(int(number[i]) * 10 ** (len(number) - i - 1))
	addends = [str(i) for i in addends if i != 0]
	print(len(addends))
	print(' '.join(addends))


def r(t=int):
	return list(map(t, input().split()))

def ri(t=int):
	return t(input())

def cd(it):
	ret_val = dict()
	for v in it:
		ret_val[v] = ret_val.get(v, 0) + 1
	return ret_val
for _ in range(ri()):
	n = ri()
	ans = list()
	c = 0
	while n:
		if n % 10:
			ans.append(n % 10 * 10 ** c)
		c += 1
		n = n // 10
	print(len(ans))
	print(' '.join((str(i) for i in ans)))


for _ in range(int(input())):
	n = int(input())
	l = len(str(n))
	t = str(n)[::-1]
	lv = []
	count = 0
	for i in range(l):
		if int(t[i]) > 0:
			lv.append(t[i] + '0' * i)
			count += 1
	print(count)
	print(*lv)


t = int(input())
for i in range(t):
	n = int(input())
	lis = []
	while n >= 10:
		lis.append(n % 10)
		n //= 10
	lis.append(n)
	res = []
	for j in range(len(lis)):
		if lis[j] != 0:
			res.append(lis[j] * 10 ** j)
	print(len(res))
	for j in res:
		print(j, end=' ')
	print()


for i in range(int(input())):
	n = int(input())
	l = len(str(n)) - 1
	c = 0
	ans = []
	for i in str(n):
		if i == '0':
			l -= 1
			continue
		else:
			ans.append(int(i) * 10 ** l)
			l -= 1
	print(len(ans))
	print(*ans)


import sys
import math
input = sys.stdin.readline

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()

def lower_letters():
	lowercase = [chr(i) for i in range(97, 97 + 26)]
	return lowercase

def upper_letters():
	uppercase = [chr(i) for i in range(65, 65 + 26)]
	return uppercase
for i in range(int(input())):
	n = int(input())
	ans = []
	answer = []
	for i in range(len(str(n))):
		ans.append(str(n)[i] + (len(str(n)[i:]) - 1) * '0')
	for i in range(len(ans)):
		if int(ans[i]) != 0:
			answer.append(ans[i])
	print(len(answer))
	print(' '.join(answer))


n = int(input())
a = [int(input()) for _ in range(n)]
for i in a:
	ans = []
	v = len(str(i))
	w = str(i)
	for i in range(v):
		if w[i] != '0':
			ans.append(int(w[i]) * 10 ** (v - 1 - i))
	print(len(ans))
	for j in ans:
		print(j, end=' ')
	print()


ipnl = lambda n: [int(input()) for _ in range(n)]
inp = lambda : int(input())
ip = lambda : [int(w) for w in input().split()]
mp = lambda : map(int, input().split())
for _ in range(int(input())):
	n = inp()
	s = str(n)
	t = []
	for i in range(len(s)):
		if s[i] != '0':
			tt = int(s[i]) * 10 ** (len(s) - i - 1)
			t.append(tt)
	print(len(t))
	print(*t)


cases = int(input())
for num in range(cases):
	number = input()
	if number == number[0] or number == number[0] + len(number[1:]) * '0':
		print(1)
		print(number)
	else:
		arr = [number[item] + '0' * len(number[item + 1:]) for item in range(len(number)) if number[item] != '0']
		print(len(arr))
		print(' '.join(arr))


t = int(input())
while t > 0:
	t -= 1
	string = input().lstrip('0')
	n = len(string)
	ans = ''
	res = ''
	cnt = 0
	for i in range(n):
		if int(string[i:]) == 0:
			break
		if string[i] == '0':
			continue
		else:
			ans += string[i] + '0' * (n - i - 1) + ' '
			cnt += 1
	print(cnt, ans, sep='\n')


test = []
for i in range(int(input())):
	test.append(int(input()))
for i in test:
	num = []
	power = 1
	while i > 0:
		if i % 10 > 0:
			num.append(i % 10 * power)
		i = i // 10
		power = power * 10
	print(len(num))
	print(*num)


t = int(input())
for _ in range(t):
	n = int(input())
	if n >= 1 and n <= 10:
		print(1)
		print(n)
	else:
		count = 0
		if n % 10 ** (len(str(n)) - 1) == 0:
			print(1)
			print(n)
		else:
			a = []
			while n != 0:
				rem = n % 10
				n = n // 10
				a.append(rem)
			for i in a:
				if i != 0:
					count = count + 1
			print(count)
			for i in range(len(a)):
				if a[i] * 10 ** i != 0:
					print(a[i] * 10 ** i, end=' ')
			print()


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


c = int(input())
for m in range(0, c):
	a = input()
	n = len(a)
	p = []
	f = []
	for i in range(0, n):
		s = a[i]
		l = len(a)
		for y in range(i, l - 1):
			s = s + '0'
		p.append(s)
	for i in range(0, len(p)):
		if int(p[i]) == 0:
			pass
		else:
			f.append(int(p[i]))
	print(len(f))
	for i in range(0, len(f)):
		print(f[i], end=' ')
	print(' ')


tests = int(input())
for i in range(tests):
	num = list(input())
	arr = []
	for j in range(len(num)):
		if num[j] == '0':
			continue
		zeroes = '0' * (len(num) - j - 1)
		arr.append(num[j] + zeroes)
	print(len(arr))
	for j in range(len(arr) - 1):
		print(arr[j], end=' ')
	print(arr[len(arr) - 1])


a = int(input())
for ifei in range(a):
	val = input()
	val = list(val)
	count = 0
	for i in val:
		if i != '0':
			count += 1
	print(count)
	lst = []
	num = -1
	for j in val[::-1]:
		num += 1
		if j != '0':
			lst.append(j + '0' * num)
	print(' '.join(lst))


t = int(input())
for tt in range(t):
	s = input()
	n = len(s)
	res = 0
	l = []
	if n == 1:
		print(1)
		print(s)
	else:
		for i in range(n):
			if s[i] == '0':
				continue
			else:
				res += 1
				l.append(s[i] + '0' * (n - 1 - i))
		print(res)
		print(*l)


x = int(input(''))
m = 0
list = []
list1 = []
list2 = []
for c in range(x):
	y = input('')
	list.append(y)
	for i in range(len(list[c])):
		if int(list[c][i]) > 0:
			m += 1
	list1.append(m)
	m = 0
	for z in range(len(list[c])):
		number = 1
		if len(list[c]) == 5:
			number = 10000
		if len(list[c]) == 4 and z == 0:
			number = 1000
		if len(list[c]) == 3 and z == 0:
			number = 100
		if len(list[c]) == 2 and z == 0:
			number = 10
		if len(list[c]) == 4 and z == 1:
			number = 100
		if len(list[c]) == 3 and z == 1:
			number = 10
		if len(list[c]) == 4 and z == 2:
			number = 10
		if int(list[c][z]) > 0:
			list2.append(int(list[c][z]) * number)
n = 0
for j in range(len(list1)):
	print(list1[j])
	if list1[j] == 1:
		print(str(list2[n]))
		n += 1
	if list1[j] == 2:
		print(list2[n], list2[n + 1])
		n += 2
	if list1[j] == 3:
		print(list2[n], list2[n + 1], list2[n + 2])
		n += 3
	if list1[j] == 4:
		print(list2[n], list2[n + 1], list2[n + 2], list2[n + 3])
		n += 4


def detach(a):
	parts = []
	for i in range(len(str(a))):
		if a % 10 > 0:
			parts.append(str(a % 10) + '0' * i)
		a //= 10
	return ' '.join(parts[::-1])

def count(a):
	count = 0
	for i in range(len(str(a))):
		if a % 10 > 0:
			count += 1
		a //= 10
	return count
Inputs = []
for i in range(int(input())):
	Inputs.append(int(input()))
for i in range(len(Inputs)):
	print(count(Inputs[i]), detach(Inputs[i]), sep='\n')


for _ in range(int(input())):
	n = int(input())
	a = []
	c = 1
	while n > 0:
		if n % 10:
			a.append(n % 10 * c)
		c *= 10
		n = n // 10
	print(len(a))
	print(' '.join((str(i) for i in a)))


t = int(input())
for i in range(t):
	n = int(input())
	a = [0, 0, 0, 0, 0]
	j = 0
	while n > 0:
		a[j] = n % 10
		n = n // 10
		j += 1
	b = []
	for j in range(5):
		if a[j] != 0:
			b.append(str(a[j] * pow(10, j)))
	print(len(b))
	print(' '.join(b))


t = int(input())
for asdf in range(t):
	n = int(input())
	a = []
	l = 0
	while n > 0:
		temp = n % 10
		n = n // 10
		a.append(temp)
	for i in range(a.__len__()):
		if a[i] != 0:
			l = l + 1
	print(l)
	for i in range(a.__len__()):
		if a[i] == 0:
			pass
		else:
			print(a[i] * 10 ** i, end=' ')
	print()


t = int(input())
for tt in range(t):
	n = int(input())
	s = str(n)
	ans = 0
	res = []
	for i in range(len(s)):
		if i == len(s) - 1 and s[i] != '0':
			res.append(s[i])
			ans += 1
		elif s[i] != '0':
			ans += 1
			res.append(10 ** (len(s) - i - 1) * int(s[i]))
	print(ans)
	for ii in res:
		print(ii, end=' ')
	print()


t = int(input())
ans = []
for i in range(t):
	lst = []
	n = input()
	l = len(n)
	cnt = 0
	for i in range(1, len(n) + 1):
		if n[-i] != '0':
			cnt += 1
			lst += [str(n[-i]) + '0' * (i - 1)]
	ans += [cnt, ' '.join(lst)]
print(*ans, sep='\n')


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	s = input()
	n = len(s)
	ans = []
	for i in range(n):
		if s[i] != '0':
			num = s[i] + '0' * (n - i - 1)
			ans += [num]
	print(len(ans))
	print(*ans)


def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		digits = []
		while n > 0:
			digits.append(n % 10)
			n = int(n / 10)
		length = 0
		for num in digits:
			if num != 0:
				length += 1
		print(length)
		for i in range(len(digits)):
			if digits[i] > 0:
				print(digits[i] * 10 ** i, end=' ')
		print()
main()


import math

def get_num():
	return list(map(int, input().rstrip().split()))

def rotate(my_list, num):
	return my_list[num:] + my_list[:num]

def main():
	num = int(input())
	for i in range(num):
		mynum = input()
		array = len(mynum) * [0]
		mynum = int(mynum)
		cont = 0
		scaler = 1
		while mynum >= 1:
			digit = math.floor(mynum % 10)
			array[cont] = digit * scaler
			cont += 1
			scaler *= 10
			mynum /= 10
		if 0 in array:
			array = list(set(array))
			array.remove(0)
			print(len(array))
			print(' '.join(map(str, array)))
		else:
			print(len(array))
			print(' '.join(map(str, array)))
main()
list = [1, 2, 3, 4]


for _ in range(int(input())):
	n = input()
	k = []
	l = len(n) - 1
	for x in range(len(n)):
		if n[x] == '0':
			l -= 1
		else:
			k.append(n[x] + '0' * l)
			l -= 1
	print(len(k))
	print(str(k).replace("'", '').replace('[', '').replace(']', '').replace(',', ''))


t = int(input())
for i in range(t):
	arr = list(map(int, input()))
	length = list()
	for j in range(len(arr)):
		length.append(len(arr) - j - 1)
	print(len([x for x in arr if x != 0]))
	for j in range(len(arr)):
		if arr[j] != 0:
			print(str(arr[j]) + '0' * length[j], end=' ')
	print()


t = int(input())
while t > 0:
	count = 0
	ll = []
	num = input()
	l = int(len(num))
	for i in range(l):
		if num[i] != '0':
			count = count + 1
			ll.append(int(num[i]) * 10 ** (l - 1 - int(i)))
	print(count)
	print(*ll)
	t = t - 1


for _ in [0] * int(input()):
	ans = 0
	s = input()
	l = len(s)
	for j in range(0, l):
		if s[j] != '0':
			ans += 1
	print(ans)
	i = 0
	for j in range(0, l):
		if s[j] != '0':
			print(s[j], end='')
			for k in range(j + 1, l):
				print('0', end='')
			print(' ', end='')
	print()


for _ in range(int(input())):
	N = input()
	Answers = []
	Size = len(N)
	for i in range(Size - 1, -1, -1):
		if N[i] != '0':
			Answers.append(str(N[i]) + '0' * (Size - i - 1))
	print(len(Answers))
	print(*Answers)


def main():
	for _ in range(int(input())):
		n = input()
		ln = len(n)
		print(ln - n.count('0'))
		result = []
		for (i, c) in enumerate(n, start=1):
			if c != '0':
				result.append(c + '0' * (ln - i))
		print(*result)
main()


for something in range(int(input())):
	n = input()
	s = ''
	ans = 0
	for (i, x) in enumerate(n):
		if x != '0':
			s += x + '0' * (len(n) - i - 1) + ' '
			ans += 1
	print(ans, s, sep='\n')


i = int(input())
lista = []
for _ in range(0, i):
	num = input()
	s = ''
	t = 0
	for y in range(0, len(num)):
		if num[y] != '0':
			s += num[y]
			t += 1
			for _ in range(y, len(num) - 1):
				s += '0'
			s += ' '
	lista.append(t)
	lista.append(s)
for x in lista:
	print(x)


t = int(input())
while t:
	n = int(input())
	ans = []
	i = 1
	while n > 0:
		if n % 10 != 0:
			ans.append(n % 10 * i)
		i *= 10
		n //= 10
	print(len(ans))
	print(*ans)
	t -= 1


def s():
	n = int(input())
	counter = 0
	ans = []
	while n:
		r = n % 10
		n = n // 10
		if r != 0:
			ans.append(r * 10 ** counter)
		counter += 1
	print(len(ans))
	for x in ans:
		print(x, end=' ')
	print()
t = int(input())
for i in range(t):
	s()


b = int(input())
for _ in range(b):
	s1 = []
	a = int(input())
	for i in range(len(str(a))):
		if str(a)[i] != '0':
			s1.append(str(a)[i] + '0' * (len(str(a)) - i - 1))
	print(len(s1))
	print(' '.join(s1))


for tc in range(int(input())):
	n = int(input())
	l = []
	i = 0
	while n > 0:
		x = n % 10
		if x != 0:
			l.append(x * 10 ** i)
		i += 1
		n = n // 10
	print(len(l))
	print(*l[::-1], sep=' ')


num_cases = int(input())
for _ in range(num_cases):
	n = int(input())
	arr = []
	power = 1
	while n > 0:
		d = n % 10
		if d > 0:
			arr.append(d * power)
		power *= 10
		n = n // 10
	print(len(arr))
	print(' '.join([str(x) for x in arr]))


t = int(input())
for i in range(t):
	s = input()
	ar = list(s)
	s0 = s[::-1]
	print(len(s0) - ar.count('0'))
	c = 0
	for j in range(len(s0)):
		if s0[j] != '0':
			c += 1
			print(int(s0[j]) * pow(10, j), end=' ')
	print()


def round_sum(n):
	div = 10
	result = []
	while n > 0:
		x = n % div
		n -= x
		if x != 0:
			result.append(str(x))
		div *= 10
	return result
t = int(input())
for i in range(t):
	n = int(input())
	solution = round_sum(n)
	print(len(solution))
	print(' '.join(solution))


def main():
	string = str(input())
	if len(string) == 1:
		print(1)
		print(string)
		return
	cnt = 0
	for i in range(len(string)):
		if string[i] != '0':
			cnt += 1
	print(cnt)
	for i in range(len(string)):
		if string[i] != '0':
			res = string[i] + '0' * (len(string) - i - 1)
			print(res, end=' ')
	print()
	return
t = int(input())
while t:
	main()
	t -= 1


lst = []
while True:
	try:
		lst.append(input())
	except:
		break
n = len(lst)
for i in range(1, n):
	sum = 0
	lst1 = []
	x = len(lst[i])
	for j in range(0, x):
		if lst[i][j] != '0':
			sum += 1
			lst1.append(int(list(lst[i])[j]) * 10 ** (x - 1 - j))
	print(sum)
	for i in lst1:
		print(i, end=' ')
	print('\n', end='')


def solve(n):
	strs = str(n)
	l = len(strs) - 1
	rem = n
	res = []
	while rem != 0:
		rem = n % 10 ** l
		if n - rem != 0:
			res.append(n - rem)
		n = rem
		l -= 1
	return (len(res), res)

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		ans = solve(n)
		print(ans[0])
		for i in ans[1]:
			print(i, end=' ')
		print()
main()


for _ in range(int(input())):
	n = input()
	l = []
	a = -1
	s = len(n)
	k = 0
	while k < s:
		cur = ''
		if n[k] != '0':
			cur = n[k] + '0' * (s - k - 1)
			l.append(cur)
		k += 1
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


T = int(input())
while T != 0:
	n = input()
	ans = []
	multiplier = 1
	while len(n) != 0:
		ans.append(int(n[-1]) * multiplier)
		multiplier *= 10
		n = n[:-1]
	fa = []
	for an in ans:
		if an != 0:
			fa.append(an)
	print(len(fa))
	print(' '.join([str(f) for f in fa]))
	T -= 1


t = int(input())
for _ in range(t):
	n = input()
	l = list(n)
	xd = []
	for i in range(len(l)):
		if int(l[i]) != 0 and i == len(l) - 1:
			xd.append(int(l[i]))
			break
		if int(l[i]) != 0:
			zero = '0' * (len(l) - (i + 1))
			no = l[i] + zero
			xd.append(int(no))
	print(len(xd))
	for j in range(len(xd)):
		print(xd[j], end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	c = 0
	lst = []
	res = [int(x) for x in str(n)]
	for i in range(len(res)):
		if res[i] != 0:
			c += 1
	print(c)
	mul = 1
	for i in reversed(range(len(res))):
		if res[i] != 0:
			lst.append(res[i] * mul)
		mul *= 10
	for i in range(len(lst)):
		print(lst[i], end=' ')
	print()


def resolve():
	t = int(input())
	for _ in range(t):
		n = input()
		ans = []
		for (index, i) in enumerate(n[::-1]):
			if i != '0':
				ans.append(int(i) * 10 ** index)
		print(len(ans))
		print(*ans)
resolve()


def remove_values_from_list(the_list, val):
	return [value for value in the_list if value != val]
for _ in range(int(input())):
	n = int(input())
	l = list()
	g = 0
	while n != 0:
		l.append(n % 10)
		n //= 10
		g += 1
	g -= 1
	l.reverse()
	k = list()
	for i in l:
		k.append(i * 10 ** g)
		g -= 1
	k = remove_values_from_list(k, 0)
	print(len(k))
	for i in k:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = input()
	temp = []
	for i in range(len(n)):
		if n[i] != '0':
			temp.append(n[i] + '0' * len(n[i + 1:]))
	print(len(temp))
	print(' '.join(temp))


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


import math

def q(n):
	ans = []
	i = 0
	while int(n) != 0:
		u = n // math.pow(10, i) % 10 * math.pow(10, i)
		n -= u
		if u > 0:
			ans.append(int(u))
		i += 1
	return ans
for _ in range(int(input())):
	ans = q(int(input()))
	print(len(ans))
	print(*ans)


n = int(input())
for i in range(n):
	k = int(input())
	b = []
	i = 1
	while k != 0:
		a = k % 10
		l = a * i
		i = i * 10
		k = k // 10
		if l != 0:
			b.append(l)
	b = b[::-1]
	print(len(b))
	for i in b:
		print(i, end=' ')


t = int(input())
for _ in range(t):
	i = input()
	k = 0
	l = len(i)
	list = []
	for s in i:
		if int(s) != 0:
			k += 1
			list.append(10 ** (l - 1) * int(s))
		l -= 1
	print(k)
	L = [str(a) for a in list]
	print(' '.join(L))


T = int(input())
while T > 0:
	n = int(input())
	a = str(n)
	l = list(a)
	s = []
	cnt = 0
	for j in range(len(l)):
		sum = int(l[j]) * 10 ** (len(l) - j - 1)
		if sum != 0:
			cnt += 1
			s.append(sum)
	print(cnt)
	for i in range(len(s)):
		if i == len(s) - 1:
			print(s[i])
		else:
			print(s[i], end=' ')
	T -= 1


for i in range(int(input())):
	n = int(input())
	st = str(n)
	lst = []
	for j in range(len(st)):
		st = str(n)
		if len(st) > 1 and st.count('0') != len(st) - 1:
			k = int(st[0] + ''.join(('0' for z in st[1:])))
			n = n - k
			lst.append(k)
		else:
			lst.append(n)
			print(len(lst))
			print(' '.join((str(x) for x in lst)))
			break


GI = lambda : int(input())
GIS = lambda : map(int, input().split())
LGIS = lambda : list(GIS())

def main():
	t = GI()
	for i in range(t):
		n = GI()
		l = []
		while n:
			(n, m) = divmod(n, 10)
			l.append(m)
		print(sum((bool(x) for x in l)))
		for (i, d) in enumerate(l):
			if d:
				print(d * 10 ** i, end=' ')
		print()
main()


test = int(input())
for i in range(test):
	val = input()
	a = int(val)
	l = []
	for i in range(len(val)):
		k = a % 10 * 10 ** i
		if k == 0:
			a //= 10
		else:
			l.append(str(k))
			a //= 10
	print(len(l))
	print(' '.join(l))


t = int(input())
for i in range(t):
	n = input()
	index = 0
	num = 0
	arr = list()
	for j in range(len(n)):
		if n[j] != '0':
			num += 1
			s = n[j] + '0' * (len(n) - j - 1)
			arr.append(s)
	print(num)
	for j in arr:
		print(j)


t = int(input())
for x in range(t):
	num = int(input())
	arr = []
	power = 1
	while num > 0:
		if num % 10 > 0:
			arr.append(num % 10 * power)
		num = num // 10
		power = power * 10
	print(len(arr))
	for val in arr:
		print(val, end=' ')


from math import *
for _ in range(int(input())):
	n = int(input())
	i = 0
	ls = []
	while n > 0:
		p = n % 10
		n //= 10
		x = 10 ** i
		ls.append(p * x)
		i += 1
	l = []
	for i in ls:
		if i != 0:
			l.append(i)
	print(len(l))
	print(*l)


import math

def solve(n):
	num = [int(d) for d in str(n)]
	size = len(num)
	ans = []
	for digit in num:
		power = math.pow(10, size - 1)
		if digit != 0:
			ans.append(int(digit * power))
		size -= 1
	print(len(ans))
	for round_num in ans:
		print(round_num, end=' ')
	print()
testCases = int(input())
while testCases:
	n = int(input())
	solve(n)
	testCases -= 1


def count(n):
	a = 0
	for i in range(len(str(n))):
		s = n % 10
		if s != 0:
			a = a + 1
		n = n // 10
	return a
t = int(input())
for i in range(t):
	n = int(input())
	l = len(str(n))
	print(count(n))
	for i in range(l):
		s = n % 10
		if s != 0:
			print(s * 10 ** i, end=' ')
		n = n // 10
	print()


num = int(input())
a = ''
for n in range(num):
	cas = int(input())
	leng = len(str(cas))
	for m in range(leng):
		b = int(str(cas)[leng - 1 - m])
		b = b * 10 ** m
		if b == 0:
			b = ''
		else:
			a = a + '' + str(b) + ' '
			cas = cas - b
	a = a.split(' ')
	a = [i for i in a if i]
	print(len(a))
	print(' '.join(a))
	a = ''


a = int(input())
for i in range(a):
	b = input()
	h = []
	for j in range(len(b)):
		if b[j] != '0':
			h.append(b[j] + '0' * len(b[j + 1:]))
	print(len(h))
	print(*h)


def round_sum(n):
	string = str(n)
	lista = []
	for i in range(0, len(string)):
		if string[i] != '0':
			lista += [int(string[i]) * 10 ** (len(string) - i - 1)]
	print(len(lista))
	for i in lista:
		print(i)
t = int(input())
for i in range(t):
	n = int(input())
	round_sum(n)


import math, sys
import heapq
from fractions import Fraction
from collections import Counter, defaultdict

def li():
	return list(map(int, sys.stdin.readline().split()))

def ls():
	return list(map(int, list(input())))

def la():
	return list(input())

def ii():
	return int(input())

def dic(x):
	return defaultdict(lambda : x)

def isPrime(n):
	i = 2
	if n == 1:
		return False
	while i <= int(math.sqrt(n)):
		if n % i == 0:
			return False
		i = i + 1
	return True

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def LCM(a, b):
	return a * b / gcd(a, b)
t = int(input())
for _ in range(t):
	n = int(input())
	a = []
	i = 0
	for i in range(1, 5):
		if n % 10 ** i != 0:
			a.append(n % 10 ** i)
			n -= n % 10 ** i
			if n == 0:
				break
	if n != 0:
		a.append(n)
	print(len(a))
	print(*a)


t = int(input())
for z in range(t):
	n = int(input())
	s = str(n)
	l = list(s)
	arr = []
	nl = len(l)
	for i in range(nl):
		if l[i] != '0':
			ss = l[i] + '0' * (nl - 1 - i)
			arr.append(ss)
	print(len(arr))
	print(*arr)


t = int(input())
while t:
	a = int(input())
	n = len(str(a))
	v = []
	for i in range(n):
		m = a % 10
		a = a // 10
		if m != 0:
			v.append(m * 10 ** i)
	print(len(v))
	print(*v)
	t -= 1


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	n = int(input())
	n = str(n)
	s = ''
	z = len(n)
	c = 0
	for j in range(len(n)):
		if n[j] != '0':
			temp = n[j] + '0' * (z - j - 1)
			s += temp + ' '
			c += 1
	print(c)
	print(s)


n = int(input())
for i in range(0, n):
	a = input()
	c = 0
	l = []
	for j in range(0, len(a)):
		if a[j] != '0':
			l.append(a[j] + '0' * len(a[j + 1:]))
			c = c + 1
	print(c)
	w = l[::-1]
	for k in w:
		print(k, end=' ')


for _ in range(int(input())):
	n = int(input())
	result = []
	power = 1
	while n > 0:
		if n % 10 != 0:
			result.append(n % 10 * power)
		n //= 10
		power *= 10
	print(len(result))
	for i in result:
		print(i, end=' ')
	print()


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	ans_a = []
	ans_b = []
	for _ in range(n):
		x = I()
		_ans = []
		for i in range(1, len(str(x)) + 1):
			y = 10 ** i
			z = x % y
			if z != 0:
				_ans.append(z)
				x -= z
		ans_a.append(len(_ans))
		ans_b.append(_ans)
	for i in range(n):
		x = ans_a[i]
		print(x)
		print(' '.join((str(x) for x in ans_b[i])))
main()


for _ in range(int(input())):
	answer = []
	i = 0
	number = int(input())
	while number:
		if number % 10 == 0:
			number //= 10
		else:
			rn = number % 10
			number = number // 10
			answer.append(rn * 10 ** i)
		i += 1
	print(len(answer))
	answer.sort()
	print(*answer)


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


t = int(input())
for i in range(t):
	n = int(input())
	l = len(list(str(n)))
	S = 1
	num = ''
	while n > 10:
		if n % 10 ** (l - 1) == 0:
			break
		if n > 10 ** (l - 1):
			num = num + str(n - n % 10 ** (l - 1)) + ' '
			n = n % 10 ** (l - 1)
			S += 1
			l -= 1
		else:
			l -= 1
	num += str(n)
	print(S)
	print(num)


from sys import stdin, exit
for _ in range(int(stdin.readline())):
	l = list(stdin.readline().split()[0])
	a = []
	n = len(l)
	for i in range(n):
		a.append(int(l[n - i - 1] + i * '0'))
	r = [i for i in a if i != 0]
	print(len(r))
	print(' '.join(map(str, r)))
exit()


n = int(input())
for i in range(0, n):
	number = input()
	ans = []
	for j in range(0, len(number)):
		if number[j] != '0':
			ans.append(int(number[j]) * 10 ** (len(number) - j - 1))
	print(len(ans))
	for j in ans:
		print(j, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	temp = []
	count = 0
	i = 0
	while n != 0:
		no = n % 10
		if no != 0:
			temp.append(no * 10 ** i)
			count += 1
		n //= 10
		i += 1
	print(count)
	print(*temp)


t = int(input())
for ii in range(t):
	n = int(input())
	ls = []
	d = 1
	while n > 0:
		if n % 10 != 0:
			ls.append(n % 10 * d)
		n //= 10
		d *= 10
	print(len(ls))
	print(*ls)


def function(n):
	l = []
	s = str(n)
	k = len(s) - 1
	for i in range(len(s)):
		if s[i] == '0':
			k -= 1
			continue
		a = s[i]
		a += '0' * k
		l.append(int(a))
		k -= 1
	print(len(l))
	print(*l)
t = int(input())
for k in range(t):
	n = int(input())
	function(n)


n = int(input())
for i in range(n):
	integer = int(input())
	length = len(str(integer))
	sinteger = str(integer)
	summ = 0
	round_numbers = []
	for i in range(len(sinteger)):
		summ = summ + int(sinteger[i] + '0' * (length - 1 - i))
		round_numbers.append(int(sinteger[i] + '0' * (length - 1 - i)))
		if summ == integer:
			break
	round_numbers.sort()
	while round_numbers[0] == 0:
		round_numbers.pop(0)
	print(len(round_numbers))
	answer = ''
	for y in range(len(round_numbers)):
		if y == 0:
			answer = str(round_numbers[y])
		else:
			answer = answer + ' ' + str(round_numbers[y])
	print(answer)


t = int(input())
for i in range(t):
	count = 0
	arr = []
	n = int(input())
	k = 0
	while n != 0:
		if n % 10 != 0:
			arr.append(int(n % 10 * pow(10, k)))
			count += 1
		n = int(n / 10)
		k += 1
	print(count)
	arr.sort(reverse=True)
	print(*arr)


import math
for _ in range(int(input())):
	n = int(input())
	res = []
	count = 0
	prod = 0
	while n > 0:
		rem = n % 10
		if rem > 0:
			count += 1
			res.append(rem * 10 ** prod)
		prod += 1
		n = n // 10
	print(count)
	print(*res)


t = int(input())
for i in range(t):
	n = int(input())
	l = []
	count = 0
	a = n // 10000
	if a != 0:
		count += 1
		l.append(10000 * a)
	n = n % 10000
	b = n // 1000
	if b != 0:
		count += 1
		l.append(1000 * b)
	n = n % 1000
	c = n // 100
	if c != 0:
		count += 1
		l.append(100 * c)
	n = n % 100
	d = n // 10
	if d != 0:
		count += 1
		l.append(10 * d)
	n = n % 10
	if n != 0:
		count += 1
		l.append(n)
	print(count)
	for i in l:
		print(i, end=' ')


input_count = int(input())
nums = []
answers = []
for i in range(input_count):
	nums.append(input())
for num in nums:
	curr_ans = []
	for i in range(len(num)):
		curr_val = int(num[len(num) - 1 - i]) * 10 ** i
		if curr_val != 0:
			curr_ans.append(curr_val)
	answers.append(curr_ans)
for answer in answers:
	print(len(answer))
	print(' '.join(map(str, answer)))


t = int(input())
for i in range(t):
	num = str(input())
	counter = 0
	output = []
	for i in range(len(num)):
		if num[i] != '0':
			curr = str(num[i]) + ''.join(['0'] * (len(num) - i - 1))
			output.append(curr)
			counter += 1
	print(counter)
	print(' '.join(output))


n = int(input())
for i in range(n):
	cnt = 0
	pow = 1
	num = int(input())
	ans = []
	while num > 0:
		if not num % 10 == 0:
			ans.append(num % 10 * pow)
			cnt += 1
		pow *= 10
		num = num // 10
	print(cnt)
	for j in ans:
		print(j, end=' ')
	print()


for _ in range(int(input())):
	number = int(input())
	nums = []
	i = 1
	while number:
		rem = number % 10
		if rem != 0:
			nums.append(rem * i)
		i *= 10
		number //= 10
	print(len(nums))
	for i in nums:
		print(i, end=' ')


import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def main():
	for _ in range(II()):
		s = SI()
		n = len(s)
		ans = []
		for (i, c) in enumerate(s):
			if c == '0':
				continue
			ans.append(c + '0' * (n - 1 - i))
		print(len(ans))
		print(*ans)
main()


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


def kol(x):
	k = 0
	while x != 0:
		k += 1
		x //= 10
	return k
t = int(input())
for i in range(t):
	n = int(input())
	k = 0
	k1 = 0
	a = []
	y = kol(n)
	while y != k:
		x = str(n % 10)
		if x != '0':
			x += '0' * k
			k1 += 1
			a.append(x)
		k += 1
		n //= 10
	print(k1)
	print(*a)


t = int(input())
while t:
	t = t - 1
	res = 1
	l = []
	n = int(input())
	while n > 0:
		x = n % 10
		y = int(res * x)
		if y != 0:
			l.append(y)
		res = res * 10
		n = n // 10
	print(len(l))
	for i in range(len(l)):
		print(l[i], end=' ')
	print()


for tc in range(int(input())):
	n = int(input())
	(ten, ans) = (1, [])
	for i in range(5):
		ten *= 10
		if n % ten > 0:
			ans.append(n % ten)
			n -= n % ten
	print(len(ans))
	print(*ans)


t = int(input())
for _C in range(t):
	A = int(input())
	A = list(str(A))
	B = []
	s = len(A) - 1
	for i in range(len(A)):
		if A[i] == '0':
			s -= 1
			continue
		B.append(str(A[i]) + '0' * s)
		s -= 1
	print(len(B))
	for i in B:
		print(i, end=' ')
	print()


for i in range(int(input())):
	n = int(input())
	m = str(n)
	l = len(m)
	a = []
	o = 0
	b = []
	k = l - 1
	for j in range(l):
		a.append(int(m[j]))
	for j in range(0, l):
		if a[j] * 10 ** k > 0:
			o = o + 1
			b.append(a[j] * 10 ** k)
		k = k - 1
	print(o)
	for i in range(o):
		print(b[i], end=' ')
	print()


for t in range(int(input())):
	N = input()[::-1]
	lst = []
	for n in range(len(N)):
		if N[n] != '0':
			lst.append(str(int(N[n]) * 10 ** n))
	print(len(lst))
	print(' '.join(lst))


for T in range(int(input())):
	s = input()
	l = len(s)
	temp = ''
	res = []
	for i in range(l - 1, -1, -1):
		if s[i] != '0':
			res.append(s[i] + temp)
		temp += '0'
	print(len(res))
	for i in res:
		print(i, end=' ')
	print('\n', end='')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	idx = 1
	ans = []
	while n != 0:
		z = n % 10
		if z != 0:
			ans.append(z * idx)
		idx = idx * 10
		n = n // 10
	print(len(ans))
	print(*ans)


n = int(input())
for i in range(n):
	t = int(input())
	ans = []
	while t != 0:
		f = t - t % 10 ** (len(str(t)) - 1)
		ans.append(str(f))
		t -= f
	print(len(ans))
	print(' '.join(ans))


from collections import *
from itertools import *
from functools import *
import sys
import os
import time
timer = False
debug = False

def timeit(method):

	def wrapper(*args, **kwargs):
		mname = method.__name__
		if debug:
			print('{}(args:{}, kwargs:{})'.format(mname, args, kwargs))
		if timer:
			ts = time.time()
		result = method(*args, **kwargs)
		if timer:
			te = time.time()
			print('%r  %2.2f ms' % (mname, (te - ts) * 1000))
		return result
	return wrapper

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

def read_floats():
	return list(map(float, input().split()))

def read_strs():
	return input().split()

@timeit
def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		ans = []
		i = 0
		while n:
			if n % 10 != 0:
				ans.append(n % 10 * 10 ** i)
			i += 1
			n //= 10
		print(len(ans))
		print(*ans[::-1])
main()


n = int(input())
for i in range(n):
	temp = int(input())
	strli = ''
	strtemp = str(temp)
	length = len(strtemp)
	for x in range(length):
		y = strtemp[x]
		if y != '0':
			strli += y + '0' * (length - x - 1) + ' '
	li = strli.split()
	n = len(li)
	print(n)
	print(strli)


from collections import Counter
import math
mod = 10 ** 9 + 7
for i in range(int(input())):
	n = int(input())
	ans = []
	x = str(n)
	c = 0
	a = []
	for i in range(len(x)):
		y = int(x[len(x) - i - 1]) * 10 ** i
		ans.append(y)
	for i in ans:
		if i != 0:
			a.append(i)
			c += 1
	print(c)
	print(*a)


T = int(input())
n = [0] * T
ns = [0] * T
for t in range(T):
	n = input()
	c = []
	for i in range(len(n)):
		if n[i] != '0':
			c.append(n[i] + '0' * (len(n) - 1 - i))
	print(len(c))
	for i in c:
		print(i, end=' ')
	print()


from math import log
for _ in range(int(input())):
	q = int(input())
	ans = []
	power = 1
	while q:
		digit = q % 10
		if digit != 0:
			ans.append(digit * power)
		power *= 10
		q //= 10
	print(len(ans))
	print(' '.join(map(str, ans)))


def fun(n):
	if n < 10:
		print(1)
		print(n)
	else:
		x = str(n)
		a = len(x) - x.count('0')
		print(a)
		l = []
		for i in range(len(x)):
			if x[i] != '0':
				l.append(int(x[i]) * 10 ** (len(x) - i - 1))
		print(*l)
t = int(input())
for _ in range(t):
	n = int(input())
	fun(n)


import math
p = input()
t = int(p)
while t > 0:
	n = input()
	l = len(n)
	i = 0
	result = []
	while l > 0:
		r = int(n[i]) * pow(10, l - 1)
		if r > 0:
			result.append(r)
		l = l - 1
		i = i + 1
	print(len(result))
	for i in result:
		print(i, end='  ')
	print()
	t = t - 1


cases = []
times = int(input())
for i in range(times):
	line = int(input())
	cases.append(line)
anstot = []
for i in range(len(cases)):
	test = str(cases[i])
	ans = ''
	ansholder = []
	for j in range(len(test)):
		if test[j] != '0':
			ans = test[j] + '0' * (len(test) - 1 - j)
			ansholder.append(ans)
	anstot.append(ansholder)
for i in range(len(anstot)):
	print(len(anstot[i]))
	printstr = ''
	for j in range(len(anstot[i])):
		printstr = printstr + anstot[i][j] + ' '
	print(printstr)


import sys

def sumRounders(n):
	tracker = 1
	rounds = []
	while n > 0:
		lastDigit = n % 10
		n = n // 10
		if lastDigit != 0:
			rounds.append(lastDigit * tracker)
		tracker *= 10
	print(len(rounds))
	print(*rounds)
number_loops = input()
for _ in range(int(number_loops)):
	number = input()
	sumRounders(int(number))


def func():
	N = str(int(input()))
	x = []
	for i in range(len(N)):
		if N[i] != '0':
			x.append(N[i] + '0' * (len(N) - i - 1))
	print(len(x))
	for i in x:
		print(i, end=' ')
	print()
T = int(input())
for _ in range(T):
	func()


t = int(input())
for k in range(t):
	n = input()
	c = 0
	for i in range(len(n)):
		if n[i] != '0':
			c += 1
	print(c)
	for i in range(len(n)):
		if n[i] != '0':
			print(n[i], end='')
			for j in range(i + 1, len(n)):
				print('0', end='')
			print(end=' ')
	print('')


import sys
import typing
from typing import Callable, Dict, List, Set, Tuple
sys.setrecursionlimit(10 ** 6)
Vec = List[int]
VecVec = List[Vec]
sinput: Callable[..., str] = sys.stdin.readline
MOD: int = 998244353
INF: float = float('Inf')
IINF: int = sys.maxsize // 2

def main() -> None:
	n = sinput().strip()[::-1]
	ans = []
	for (i, d) in enumerate(n):
		if d == '0':
			continue
		ans.append(d + '0' * i)
	print(len(ans))
	print(*ans)
t = int(sinput())
for _ in range(t):
	main()


t = int(input())
for i in range(t):
	nums = []
	n = input()
	s = 0
	digits = len(n) - 1
	while digits >= 0:
		current = n[s]
		current = int(current) * 10 ** digits
		if current != 0:
			nums.append(current)
		s += 1
		digits -= 1
	length = len(nums)
	print(length)
	l = ' '.join(map(str, nums))
	print(l)


from sys import stdin, stdout, exit as sys_ret
(f_input, f_print, f_flush) = (stdin.readline, stdout.write, stdout.flush)
for _ in range(int(f_input())):
	number = int(f_input())
	power = 0
	answer = []
	while number:
		last = number % 10
		if last > 0:
			answer.append(last * 10 ** power)
		number //= 10
		power += 1
	f_print(str(len(answer)) + '\n')
	for i in answer:
		f_print(str(i) + ' ')
	f_print('\n')


t = int(input())
for case in range(t):
	p = 1
	n = int(input())
	answer = []
	p = 1
	for digit in reversed(str(n)):
		if digit != '0':
			answer.append(int(digit) * p)
		p *= 10
	print(len(answer))
	print(*answer)


n = int(input())
for i in range(n):
	ans = []
	a = input()
	la = len(a)
	for x in range(la):
		if a[x] != '0':
			ans.append(int(a[x]) * 10 ** (la - 1 - x))
	print(len(ans))
	print(*ans)


for i in range(int(input())):
	s = input()
	n = len(s) - 1
	m = s.count('0')
	print(len(s) - m)
	for i in s:
		if i != '0':
			print(i, end='')
			print('0' * n, end=' ')
		n -= 1
	print()


t = int(input())
for i in range(t):
	a = int(input())
	res = []
	rez = ''
	deli = 10
	for i in range(len(str(a))):
		b = a % deli
		a = a - b
		deli = deli * 10
		if b != 0:
			res.append(b)
	print(len(res))
	for j in res:
		rez = rez + str(j) + ' '
	print(rez)


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 10:
		k = 1
		l = n
		print(k)
		print(l)
	else:
		s = str(n)
		k = 0
		l = []
		for i in range(len(s)):
			if s[i] != '0':
				k = k + 1
				l.append(s[i].ljust(len(s) - i, '0'))
		print(k)
		print(*l)


for t in range(int(input())):
	n = int(input())
	r = len(str(n))
	f = str(n)
	p = 0
	l = []
	while r != 0:
		a = int(f[p]) * 10 ** (r - 1)
		if a != 0:
			l.append(a)
		p += 1
		r -= 1
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


t = int(input())
for x in range(t):
	n = int(input())
	z = []
	while n > 0:
		z.append(n % 10)
		n //= 10
	b = []
	for x in range(len(z)):
		if z[x]:
			b.append(z[x] * 10 ** x)
	print(len(b))
	print(' '.join(map(str, b)))


sum_ = 0

def main(m, b):
	global sum_
	if m % b == 0:
		if m != 0:
			sum_ += 1
		print(sum_)
		print(m, end=' ')
	elif m // b * b != 0:
		sum_ += 1
		main(m % b, b // 10)
		print(m // b * b, end=' ')
	else:
		main(m % b, b // 10)
t = int(input())
for i in range(t):
	sum_ = 0
	n = int(input())
	main(n, 1000)
	print()


for i in range(int(input())):
	e = []
	a = int(input())
	n = 1
	while a != 0:
		b = int(str(a % 10 ** (len(str(a)) - 1)))
		if b == 0 and n == 1:
			break
		e.append(a - b)
		a = b
		if b != 0:
			n = n + 1
	print(n)
	if n > 1:
		print(*e)
	else:
		print(a)


import math
inputCount = int(input())
for _ in range(inputCount):
	iterCount = 0
	answer = []
	num = input()
	numLength = len(num)
	for _ in range(numLength):
		intIndex = int(num[_])
		if intIndex != 0:
			answer.append(int(intIndex * math.pow(10, numLength - _ - 1)))
			iterCount += 1
	print(iterCount)
	print(*answer)


num = int(input())
fin = ''
for i in range(num):
	cot = 0
	ans = ''
	n = int(input())
	while n != 0:
		if n % 10 == 0:
			n = n / 10
		else:
			ans += '0' * cot + str(int(n % 10)) + ' '
			n = n // 10
		cot += 1
	fin += str(len(ans[::-1][1:].split(' '))) + '\n'
	fin += ans[::-1][1:] + '\n'
print(fin)


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


import math
import sys
for _ in range(int(input())):
	n = int(input())
	mul = 1
	a = []
	while n != 0:
		if n % 10 != 0:
			a.append(n % 10 * mul)
		mul *= 10
		n //= 10
	print(len(a))
	print(*a)


for _ in range(int(input())):
	n = input()
	c = 0
	for i in n:
		if i != '0':
			c += 1
	print(c)
	k = len(n)
	m = k - 1
	l = []
	for i in range(k):
		if n[i] != '0':
			s = n[i] + '0' * m
			l.append(s)
		m = m - 1
	print(*l)


y = int(input())
for sdfh in range(y):
	n = input()
	list_n = [str(z) for z in n]
	str_n = 0
	total = 0
	list_of_vals = []
	while str_n != int(n):
		total += 1
		temp_value = list_n[0] + '0' * (len(list_n) - 1)
		if int(temp_value) != 0:
			list_of_vals.append(temp_value)
		str_n += int(temp_value)
		list_n.pop(0)
	print(len(list_of_vals))
	for qb in list_of_vals:
		print(qb, ' ', end='')


t = int(input())
for _ in range(t):
	n = int(input())
	digits = list(str(n))
	res = list()
	zeros = ''
	for i in reversed(range(len(digits))):
		if digits[i] != '0':
			res.append(digits[i] + zeros)
		zeros += '0'
	print(len(res))
	print(' '.join(res))


from sys import stdin, stdout
from math import *
for __ in range(int(input())):
	n = input()
	n = n[::-1]
	ans = []
	for i in range(len(n)):
		if n[i] != '0':
			ans.append(n[i] + '0' * i)
	print(len(ans))
	print(*ans)


c = int(input())
for i in range(c):
	a = input()
	arr = []
	if int(a) >= 1 and int(a) <= 10000:
		if len(a) == 1:
			arr.append(a)
		else:
			for i in range(len(a) - 1, -1, -1):
				if a[i] != '0':
					arr.append(a[i] + '0' * (len(a) - 1 - i))
		print(len(arr))
		print(' '.join(arr))


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	ans = []
	s = str(n)[::-1]
	count = 0
	i = 0
	for ele in s:
		if ele != '0':
			ans.append(int(ele) * 10 ** i)
		i += 1
	print(len(ans))
	print(*ans)


def number(n):
	final = []
	i = 1
	j = 1
	while n != 0:
		b = n % 10 ** i * 10 ** (j - 1)
		if b != 0:
			final.append(b)
		n = n // 10 ** i
		j = j + 1
	return final
t = int(input())
for i in range(t):
	n = int(input())
	print(len(number(n)))
	print(*number(n))


t = int(input())
while t > 0:
	n = int(input())
	i = len(str(n))
	li = []
	for j in str(n):
		if j != '0':
			li.append(j + '0' * (i - 1))
		i -= 1
	print(len(li))
	print(' '.join(li))
	t -= 1


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

def solve():
	n = int(input())
	result = []
	m = 1
	while n > 0:
		if n % 10 != 0:
			result.append(n % 10 * m)
		n //= 10
		m *= 10
	print(len(result))
	print(*result)
t = int(input())
for i in range(t):
	solve()


num = int(input())
x = []
for j in range(num):
	z = int(input())
	x.append(z)
for j in range(num):
	y = len(str(x[j]))
	z = []
	for i in range(y):
		if x[j] % 10 != 0:
			z.append(x[j] % 10 * 10 ** i)
		x[j] = x[j] // 10
	print(len(z))
	print(*z, sep=' ')


import math
for tc in range(int(input())):
	n = int(input())
	(i, l) = (0, [])
	while n:
		if n % 10:
			l.append(n % 10 * 10 ** i)
		n = n // 10
		i += 1
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


tes = int(input())
for i in range(tes):
	n = int(input())
	d = set()
	t = 0
	while n:
		d.add(n % 10 * 10 ** t)
		n //= 10
		t += 1
	if 0 in d:
		d.remove(0)
	print(len(d))
	print(*list(d))


def round_decomposition(c):
	k = 1
	A = []
	while c > 0:
		if c % 10 ** k != 0:
			A.append(c % 10 ** k)
			c = c - c % 10 ** k
			k += 1
		else:
			k += 1
	print(len(A))
	print(*A)
t = int(input())
for i in range(t):
	n = int(input())
	k = 1
	round_decomposition(n)


t = int(input())
for i1 in range(t):
	s = input()
	result = []
	for i2 in range(len(s) - 1, -1, -1):
		if s[i2] != '0':
			result.append(s[i2] + '0' * (len(s) - 1 - i2))
	print(len(result))
	print(*result)


for _ in range(int(input())):
	n = input()
	size = len(n)
	p = []
	for i in range(size):
		if n[i] != '0':
			p.append(n[i] + '0' * (size - i - 1))
	print(len(p))
	print(*p)


cnt = int(input())
for _ in range(cnt):
	res = 0
	number = input()
	for i in range(len(number)):
		if int(number[i]) != 0:
			res += 1
	print(res)
	for i in range(len(number)):
		if int(number[i]) != 0:
			print(number[i] + '0' * (len(number) - i - 1), end=' ')
	print()


n = int(input())
for i in range(n):
	a = input()
	ans = ''
	print(len(a) - a.count('0'))
	for d in range(len(a)):
		if a[d] != '0':
			ans += a[d] + '0' * (len(a) - d - 1) + ' '
	print(ans.rstrip())


t = int(input())
if t >= 1 and t <= 10000:
	tn = [0] * t
	for i in range(t):
		tn[i] = int(input())
	for i in range(t):
		n = tn[i]
		if n >= 1 and n <= 10000:
			s = str(n)
			l = len(s)
			cout = 0
			for j in range(l):
				if s[j] != '0':
					cout += 1
			print(cout)
			for j in range(l):
				disp = s[j]
				p = pow(10, l - j - 1)
				if disp == '0':
					pass
				else:
					print(p * int(disp), end=' ')
			print()


n = int(input())

def get_result(num):
	result = []
	i = 0
	while num:
		if num % 10 != 0:
			last = num % 10
			result.append(str(last * 10 ** i))
		num //= 10
		i += 1
	print(len(result))
	print(' '.join(result))
for j in range(n):
	num = int(input())
	get_result(num)


def main():
	n = int(input())
	l = []
	for i in range(n):
		a = int(input())
		if a <= 9:
			print(1)
			print(a)
		else:
			l = []
			duljina = len(str(a)) - 1
			dijelovi = 0
			for i in str(a):
				if i != '0':
					l.append(i + '0' * duljina)
					dijelovi += 1
				duljina -= 1
			print(dijelovi)
			print(*l)
main()


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	s = list(input())
	n = len(s) - 1
	req = []
	for i in range(n):
		if s[i] != '0':
			t = s[i] + '0' * (n - i - 1)
			req.append(t)
	print(len(req))
	print(' '.join(req))


t = int(input())
for i in range(t):
	num = input()
	l = len(num)
	s = set()
	for j in range(l):
		x = int(num[j]) * 10 ** (l - j - 1)
		if x > 0:
			s.add(x)
	print(len(s))
	for y in s:
		print(y, end=' ')


for i in range(int(input())):
	x = int(input())
	ctr = 0
	lst = []
	while x:
		if x % 10 != 0:
			lst.append(x % 10 * 10 ** ctr)
		ctr += 1
		x //= 10
	print(len(lst))
	for i in lst:
		print(i, end=' ')


for _ in range(int(input())):
	ans = 0
	l1 = []
	n = int(input())
	t = 1
	while n > 0:
		r = n % 10
		if r != 0:
			l1.append(r * t)
		t = t * 10
		n = n // 10
	print(len(l1))
	for x in l1:
		print(x, end=' ')
	print()


def expansion(n):
	t = str(n)
	i = len(t)
	out = []
	j = i
	while j > 0:
		if int(t[j - 1]) != 0:
			out.append(int(t[j - 1]) * 10 ** (i - j))
		j -= 1
	return out
for _ in range(int(input())):
	n = int(input())
	out = expansion(n)
	print(len(out))
	print(*out)


def isround(n):
	n = str(n)
	if len(n) == 1:
		return True
	n = n[1:]
	if int(n) == 0:
		return True
	return False

def solve(ls):
	for n in ls:
		temp = []
		i = 1
		for _ in range(len(str(n))):
			if isround(n):
				temp.append(n)
				break
			if n % 10 ** i != 0:
				temp.append(n % 10 ** i)
			n = 10 ** i * (n // 10 ** i)
			i += 1
		print(len(temp))
		for i in temp:
			print(i, end=' ')
		print()
t = int(input())
ls = []
for i in range(t):
	ls.append(int(input()))
solve(ls)


import math
t = int(input())
for _ in range(t):
	n = int(input())
	cnt = 0
	l = []
	p = 0
	while n:
		if n % 10:
			l.append(n % 10 * pow(10, p))
			cnt += 1
		n = n // 10
		p += 1
	print(cnt)
	l.reverse()
	print(*l)


t = int(input())
factor = 1
for i in range(t):
	number = int(input())
	l = []
	factor = 10
	while number > 0:
		remainder = number % factor
		number = number - remainder
		if remainder > 0:
			l.append(remainder)
		factor = factor * 10
	print(len(l))
	print(*l)


k = int(input())
for i in range(k):
	p = 1
	l = []
	n = int(input())
	for j in range(1, 6):
		x = n % 10 ** j
		if x != 0:
			l.append(x)
			n -= x
	print(len(l))
	print(*l)


for i in range(int(input())):
	n = input()
	k = 0
	x = []
	f = 1
	for j in range(len(n) - 1, -1, -1):
		if n[j] != '0':
			k += 1
			x.append(int(n[j]) * f)
		f *= 10
	print(k)
	print(*x)


from sys import stdin, stdout

def main():
	t = int(stdin.readline())
	for _ in range(t):
		a = int(stdin.readline())
		pre = []
		mod = 10
		while a:
			re = a % mod
			if re:
				pre.append(str(re))
				a -= re
			mod *= 10
		stdout.write(str(len(pre)) + '\n')
		stdout.write(' '.join(pre) + '\n')
main()


def task_1(n):
	ans = []
	curr_10 = 1
	while n != 0:
		curr_digit = n % 10
		n = n // 10
		if curr_digit:
			ans.append(curr_digit * curr_10)
		curr_10 = curr_10 * 10
	print(len(ans))
	for a in ans:
		print(a, end=' ')
t = int(input())
for i in range(t):
	n = input()
	task_1(int(n))
	print()


def round_nums(num):
	x = str(num)
	if x.count('0') == len(x) - 1:
		print(1)
		print(num)
		return
	ans = []
	i = 10
	while num > 0:
		q = num % i
		if q != 0:
			ans.append(q)
			num -= q
		i *= 10
	print(len(ans))
	for i in ans:
		print(i, '', end='')
	print()
t = int(input())
for i in range(t):
	n = int(input())
	round_nums(n)


def f(a):
	ans = 0
	s_ans = ''
	for i in range(len(a)):
		if int(a[i]) != 0:
			ans += 1
			s_ans += a[i] + '0' * (len(a) - i - 1) + ' '
	print(ans)
	print(s_ans[:-1])
for i in range(int(input())):
	f(input())


t = int(input())
for q in range(t):
	n = int(input())
	a = []
	m = 1
	while n != 0:
		if n % 10 == 0:
			n = n // 10
			m *= 10
		else:
			a.append(m * (n % 10))
			n = n // 10
			m *= 10
	print(len(a))
	for i in a:
		print(i, end=' ')


n = int(input())
s = ['0'] * n
value = [0] * n
for i in range(n):
	k = list(input())
	s[i] = k[0] + '0' * (len(k) - 1)
	value[i] = 1
	for j in range(1, len(k)):
		if k[j] != '0':
			s[i] += ' ' + k[j] + '0' * (len(k) - j - 1)
			value[i] += 1
for i in range(n):
	print(value[i], '\n', s[i], sep='')


T = int(input())
rounds = []
for _ in range(T):
	n = int(input())
	n = list(str(n))
	n.reverse()
	r = []
	for (i, I) in enumerate(n):
		a = int(I) * 10 ** i
		if a != 0:
			r.append(a)
	rounds.append(r)
for r in rounds:
	print(len(r))
	for i in r:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	z = input()
	l = []
	k = len(z)
	for i in range(k):
		if z[i:i + 1] != '0':
			l.append(z[i:i + 1] + '0' * (k - i - 1))
	print(len(l))
	for i in range(len(l) - 1):
		print(l[i], end=' ')
	print(l[-1])


def ro(x):
	b = []
	for i in range(0, 5):
		if x % 10 != 0:
			b.append(int(x % 10 * 10 ** i))
		x -= x % 10
		x = x / 10
	return b
t = int(input())
r = []
for i in range(t):
	z = int(input())
	e = ro(z)
	print(len(e))
	print(*e)


for _ in range(int(input())):
	s = input()
	res = []
	n = len(s)
	for i in range(n):
		if s[i] != '0':
			res.append(s[i] + '0' * (n - i - 1))
	print(len(res))
	for r in res:
		print(r, end=' ')
	print()


for _ in range(int(input())):
	n = input()
	k = [int(n[i]) * 10 ** (len(n) - i - 1) for i in range(len(n)) if n[i] != '0']
	print(len(k))
	print(*k)


t = int(input())
for i in range(t):
	n = int(input())
	tmp = 10
	ct = 0
	roundnums = []
	while n > 0:
		if n % tmp > 0:
			roundnums.append(ct)
			roundnums[ct] = n % tmp
			ct += 1
			n -= n % tmp
		tmp *= 10
	print(ct)
	for i in range(ct):
		print(str(roundnums[i]), end=' ')
	print('\n')


for __ in range(int(input())):
	n = int(input())
	ans = []
	power = 1
	while n > 0:
		if n % 10 > 0:
			ans.append(n % 10 * power)
		n //= 10
		power *= 10
	print(len(ans))
	print(*ans)


t = int(input())
while t > 0:
	n = input()
	arr = []
	for i in list(n):
		for j in range(len(arr)):
			arr[j] += '0'
		if i != '0':
			arr.append(i)
	print(len(arr))
	print(' '.join(arr))
	t -= 1


import sys, bisect, string, math, time, functools, random
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby

def Golf():
	(*a,) = map(int, open(0))

def I():
	return int(input())

def S_():
	return input()

def IS():
	return input().split()

def LS():
	return [i for i in input().split()]

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in range(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def bit_combination(k, n=2):
	rt = []
	for tb in range(n ** k):
		s = [tb // n ** bt % n for bt in range(k)]
		rt += [s]
	return rt

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
YN = ['YES', 'NO']
Yn = ['Yes', 'No']
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(1, 0), (-1, 0), (0, 1), (0, -1)]
EightNb = [(1, 0), (-1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('EWNS', FourNb))
l_alp = string.ascii_lowercase
input = lambda : sys.stdin.readline().rstrip()

class Tree:

	def __init__(self, inp_size=None, init=True):
		self.LCA_init_stat = False
		self.ETtable = []
		if init:
			self.stdin(inp_size)
		return

	def stdin(self, inp_size=None, index=1):
		if inp_size == None:
			self.size = int(input())
		else:
			self.size = inp_size
		(self.edges, _) = GI(self.size, self.size - 1, index=index)
		return

	def listin(self, ls, index=0):
		self.size = len(ls) + 1
		(self.edges, _) = GI(self.size, self.size - 1, ls, index=index)
		return

	def __str__(self):
		return str(self.edges)

	def dfs(self, x, func=lambda prv, nx, dist: prv + dist, root_v=0):
		q = deque()
		q.append(x)
		v = [-1] * self.size
		v[x] = root_v
		while q:
			c = q.pop()
			for (nb, d) in self.edges[c]:
				if v[nb] == -1:
					q.append(nb)
					v[nb] = func(v[c], nb, d)
		return v

	def EulerTour(self, x):
		q = deque()
		q.append(x)
		self.depth = [None] * self.size
		self.depth[x] = 0
		self.ETtable = []
		self.ETdepth = []
		self.ETin = [-1] * self.size
		self.ETout = [-1] * self.size
		cnt = 0
		while q:
			c = q.pop()
			if c < 0:
				ce = ~c
			else:
				ce = c
				for (nb, d) in self.edges[ce]:
					if self.depth[nb] == None:
						q.append(~ce)
						q.append(nb)
						self.depth[nb] = self.depth[ce] + 1
			self.ETtable.append(ce)
			self.ETdepth.append(self.depth[ce])
			if self.ETin[ce] == -1:
				self.ETin[ce] = cnt
			else:
				self.ETout[ce] = cnt
			cnt += 1
		return

	def LCA_init(self, root):
		self.EulerTour(root)
		self.st = SparseTable(self.ETdepth, init_func=min, init_idl=inf)
		self.LCA_init_stat = True
		return

	def LCA(self, root, x, y):
		if self.LCA_init_stat == False:
			self.LCA_init(root)
		(xin, xout) = (self.ETin[x], self.ETout[x])
		(yin, yout) = (self.ETin[y], self.ETout[y])
		a = min(xin, yin)
		b = max(xout, yout, xin, yin)
		id_of_min_dep_in_et = self.st.query_id(a, b + 1)
		return self.ETtable[id_of_min_dep_in_et]

class SparseTable:

	def __init__(self, ls, init_func=min, init_idl=float('inf')):
		self.func = init_func
		self.idl = init_idl
		self.size = len(ls)
		self.N0 = self.size.bit_length()
		self.table = [ls[:]]
		self.index = [list(range(self.size))]
		self.lg = [0] * (self.size + 1)
		for i in range(2, self.size + 1):
			self.lg[i] = self.lg[i >> 1] + 1
		for i in range(self.N0):
			tmp = [self.func(self.table[i][j], self.table[i][min(j + (1 << i), self.size - 1)]) for j in range(self.size)]
			tmp_id = [self.index[i][j] if self.table[i][j] == self.func(self.table[i][j], self.table[i][min(j + (1 << i), self.size - 1)]) else self.index[i][min(j + (1 << i), self.size - 1)] for j in range(self.size)]
			self.table += [tmp]
			self.index += [tmp_id]

	def query(self, l, r):
		r = min(self.size, r)
		N = self.lg[r - l]
		return self.func(self.table[N][l], self.table[N][r - (1 << N)])

	def query_id(self, l, r):
		N = self.lg[r - l]
		(a, b) = (self.index[N][l], self.index[N][r - (1 << N)])
		if self.table[0][a] == self.func(self.table[N][l], self.table[N][r - (1 << N)]):
			b = a
		return b

	def __str__(self):
		return str(self.table[0])

	def print(self):
		for i in self.table:
			print(*i)
show_flg = False
show_flg = True
ans = 0
T = I()
for _ in range(T):
	x = I()
	z = []
	for d in range(5)[::-1]:
		D = 10 ** d
		a = x // D
		if a != 0:
			z += [a * D]
			x -= a * D
	print(len(z))
	print(*z)


def single_integer():
	return int(input())

def multi_integer():
	return map(int, input().split())

def string():
	return input()

def multi_string():
	return input().split()
n = single_integer()
for i in range(n):
	number = single_integer()
	count = 0
	d = 10
	sample = list()
	while True:
		sample.append(number % d)
		if number % d != 0:
			count += 1
		number = number // d
		if number == 0:
			break
	print(count)
	k = 0
	for j in sample:
		if j != 0:
			print(10 ** k * j, end=' ')
		k += 1
	print()


def main():
	for _ in range(int(input())):
		n = int(input())
		if 1 <= n <= 9:
			print(1)
			print(n)
		else:
			l = []
			s = str(n)
			for i in range(1, len(s) + 1):
				t = pow(10, i)
				if n % t != 0:
					s1 = str(n % t)
					l.append(n % t)
					n -= n % t
			print(len(l))
			print(' '.join(map(str, l)))
main()


def main():
	import sys
	input = sys.stdin.buffer.readline

	def GCD(x, y):
		while y:
			(x, y) = (y, x % y)
		return x

	def lcm(a, b):
		return a * b // GCD(a, b)

	def merge(a, start, mid, end, d):
		p = start
		q = mid + 1
		arr = [0] * (end - start + 1)
		k = 0
		coun = 0
		for i in range(start, end + 1):
			if p > mid:
				arr[k] = a[q]
				q += 1
				k += 1
			elif q > end:
				arr[k] = a[p]
				d[a[p]] += coun
				k += 1
				p += 1
			elif a[p] < a[q]:
				arr[k] = a[p]
				d[a[p]] += coun
				k += 1
				p += 1
			else:
				arr[k] = a[q]
				k += 1
				q += 1
				coun += 1
		for i in range(k):
			a[start] = arr[i]
			start += 1

	def mergesort(a, start, end, d):
		if start < end:
			mid = (start + end) // 2
			mergesort(a, start, mid, d)
			mergesort(a, mid + 1, end, d)
			merge(a, start, mid, end, d)

	def inversion(l):
		d = {}
		for i in l:
			d[i] = 0
		mergesort(l, 0, len(l) - 1, d)
		return d

	def binary_search_lower(A, low, high, k):
		if high - low != 1:
			mid = (low + high) // 2
			x = A[mid]
			if x >= k:
				return binary_search_lower(A, low, mid, k)
			else:
				return binary_search_lower(A, mid, high, k)
		if A[low] >= k:
			return low
		else:
			return high

	def binary_expo(x, n):
		if n == 0:
			return 1
		elif n % 2 == 0:
			return binary_expo(x * x, n // 2)
		else:
			return x * binary_expo(x * x, (n - 1) // 2)

	def modu_expo(x, n, m):
		if n == 0:
			return 1
		elif n % 2 == 0:
			return modu_expo(x * x % m, n // 2, m)
		else:
			return x * modu_expo(x * x % m, (n - 1) // 2, m) % m

	def eEuclid(c, m):
		if m == 0:
			global d
			global x
			global y
			d = c
			x = 1
			y = 0
		else:
			eEuclid(m, c % m)
			temp = x
			x = y
			y = temp - c // m * y

	def mod_Inv(c, m):
		eEuclid(c, m)
		return (x % m + m) % m

	def ncr(n, r, p):
		num = den = 1
		for i in range(r):
			num = num * (n - i) % p
			den = den * (i + 1) % p
		return num * pow(den, p - 2, p) % p
	for _ in range(int(input())):
		n = int(input())
		ans = []
		i = 1
		while n > 10:
			x = n % 10
			if x != 0:
				ans.append(x * i)
			i = i * 10
			n = n // 10
		ans.append(n * i)
		print(len(ans))
		for i in ans:
			print(i, end=' ')
		print()
main()


n = int(input())
for i in range(n):
	arr = [0] * 5
	z_count = 0
	number = int(input())
	count = 0
	while number:
		if number % 10:
			arr[count] = number % 10
			z_count += 1
		number //= 10
		count += 1
	print(z_count)
	for i in range(5):
		if arr[i]:
			print(arr[i] * 10 ** i, end=' ')
	print()


T = int(input())

def sum_of_rounds():
	n = int(input())
	count = 1
	p = 0
	ls = []
	while n > 0:
		if n % 10 != 0:
			z = n % 10 * 10 ** count
			ls.append(int(z / 10))
			p += 1
		n = int(n / 10)
		count += 1
	print(p)
	for i in range(len(ls)):
		print(ls[i], end=' ')
	print()
for _ in range(T):
	sum_of_rounds()


for _ in range(int(input())):
	j = input()
	lis = []
	for _ in range(len(j) - 1, -1, -1):
		if j[_] == '0':
			pass
		else:
			lis.append(j[_] + '0' * (len(j) - 1 - _))
	print(len(lis))
	for _ in lis:
		print(_, end=' ')
	print()


n = int(input())
while n:
	k = input()
	c = []
	l = len(k) - 1
	for i in k:
		if int(i) > 0:
			c += [int(i) * 10 ** l]
		l -= 1
	n -= 1
	print(len(c))
	for i in c:
		print(i, end=' ')


t = int(input())
for _ in range(t):
	n = int(input())
	m = str(n)
	q = m.count('0')
	print(len(m) - q)
	b = n % 10
	if b != 0:
		print(b, end=' ')
	s = str(n)
	for i in range(1, len(str(n))):
		a = n - int(s[i:])
		if a != 0:
			print(a, end=' ')
			n = int(s[i:])


t = int(input())
result1 = []
result2 = []
for test in range(t):
	add = []
	k = input()[::-1]
	for i in range(len(k)):
		if k[i] != '0':
			add.append(int(k[i]) * 10 ** i)
	result2.append(len(add))
	result1.append(add)
for r in range(t):
	print(result2[r])
	print(*result1[r])


from math import *

def main():
	for _ in range(int(input())):
		n = input()
		z = n.count('0')
		t = len(n) - z
		print(t)
		for i in range(len(n)):
			if n[i] != '0':
				print(int(n[i]) * 10 ** (len(n) - i - 1), end=' ')
		print()
main()


for _ in range(int(input())):
	n = str(input())
	k = len(n)
	count = 0
	s = ''
	for i in range(k):
		if int(n[i]) != 0:
			count += 1
			s = s + str(n[i]) + '0' * (k - i - 1) + ' '
	print(count)
	print(s)


t = int(input())
for _ in range(t):
	n = int(input())
	li = []
	c = 0
	while n > 0:
		v = n % 10
		n = n // 10
		if v != 0:
			li.append(str(v) + '0' * c)
		c += 1
	print(len(li))
	print(*li)


t = int(input())
n = [input() for i in range(t)]
for i in n:
	rounds = []
	index = 1
	for j in i:
		if int(j) == 0:
			index += 1
			continue
		elif int(j) != 0:
			rounds.append(j + '0' * (len(i) - index))
		index += 1
	print(len(rounds))
	print(' '.join(rounds))


t = int(input())
ar = []
b = 10
for i in range(0, t):
	n = int(input())
	while n / b >= 1:
		if n % b > 0:
			ar.append(n % b)
			n = n - n % b
			b = b * 10
		else:
			b = b * 10
	ar.append(n % b)
	print(len(ar))
	for i in range(0, len(ar)):
		print(ar[i], end=' ')
	ar = []
	b = 10


def get_user_input(n):
	input_list = []
	for i in range(n):
		input_list.append(int(input()))
	return input_list
n = int(input())
input_list = get_user_input(n)
for i in range(len(input_list)):
	num = input_list[i]
	count = 0
	d_number = 1
	itr = 0
	output_list = []
	while num > 0:
		res = num % 10
		num = num // 10
		if res != 0:
			count += 1
			output_list.append(10 ** itr * res)
		itr += 1
	print(count)
	ans = ''
	for j in range(len(output_list) - 1):
		ans += str(output_list[j]) + ' '
	ans += str(output_list[len(output_list) - 1])
	print(ans)


for i in range(int(input())):
	n = input()
	j = count = 0
	l = []
	for i in n[::-1]:
		if i != '0':
			l.append(str(i) + str('0') * j)
			count += 1
		j += 1
	print(count)
	print(*l)


t = int(input())
while t:
	n = input()
	l = len(n)
	k = []
	cn = 0
	for i in range(l):
		if n[i] != '0':
			cn += 1
			t1 = n[i] + '0' * (l - i - 1)
			k.append(int(t1))
	print(cn)
	for i in range(len(k)):
		print(k[i], end=' ')
	print()
	t -= 1


t = int(input())
while t:
	t -= 1
	n = int(input())
	if n <= 10:
		print(1)
		print(n)
	else:
		ans = []
		while n:
			ans.append(n % 10)
			n //= 10
		ss = []
		kl = 0
		k = 1
		for i in range(len(ans)):
			ss.append(k * ans[i])
			k *= 10
		for i in ss:
			if i != 0:
				kl += 1
		f = ' '.join([str(i) for i in ss if i != 0])
		print(kl)
		print(f)


def solve():
	n = int(input())
	result = []
	i = 0
	while n > 0:
		x = n % 10 * 10 ** i
		if x != 0:
			result.insert(0, x)
		n = n // 10
		i += 1
	print(len(result))
	for x in result:
		print(x, sep='\n')
t = int(input())
for _ in range(t):
	solve()


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


t = int(input())
for loop in range(t):
	n = int(input())
	ans = []
	for i in range(4, -1, -1):
		if n // 10 ** i != 0:
			ans.append(n // 10 ** i * 10 ** i)
			n %= 10 ** i
	print(len(ans))
	print(*ans)


def main():
	from sys import stdin, stdout
	n = stdin.readline()
	n = int(n)
	res = 0
	lines = stdin.readlines()
	for line in lines:
		a = line
		leng = len(a) - 2
		res = []
		for n in a:
			if n == '\n':
				break
			if int(n) != 0:
				res.append(int(n) * 10 ** leng)
			leng -= 1
		print(len(res))
		for i in res:
			stdout.write(str(i) + ' ')
		stdout.write('\n')
main()


t = int(input())
while t:
	n = input()
	s = len(n)
	num = int(n)
	a = []
	if num % 10 == 0:
		c = n.count('0')
		if c == s - 1:
			print('1')
		else:
			r = n.replace('0', '')
			print(len(r))
	else:
		res = n.replace('0', '')
		print(len(res))
	for i in range(s):
		temp = num % 10
		num = num // 10
		if temp != 0:
			print(temp * 10 ** i, end=' ')
	print(' ')
	t = t - 1


def round(n):
	x = len(str(n)) - 1
	if n % pow(10, x) == 0:
		N.append(n)
	else:
		r = n % pow(10, x)
		n -= n % pow(10, x)
		round(n)
		round(r)
	return N
t = int(input())
for _ in range(t):
	n = int(input())
	z = 1
	N = []
	N = round(n)
	print(len(N))
	for i in range(len(N)):
		print(N[i], end=' ')
	print()


n = int(input())
for i in range(n):
	num = int(input())
	s = str(num)
	l = list(s)
	count = 0
	l1 = []
	for x in range(len(l)):
		if l[x] != '0':
			count += 1
			l1.append(str(int(l[x]) * 10 ** (len(l) - x - 1)))
	print(count)
	print(' '.join(l1))


from math import log
t = int(input())
for i in range(t):
	n = int(input())
	count = 0
	l = []
	while n > 10:
		x = int(log(n, 10) + 1)
		z = 10 ** (x - 1)
		count += 1
		l.append(z * (n // z))
		n = n % z
	if n > 0:
		count += 1
		l.append(n)
	print(count)
	for j in range(len(l)):
		print(l[j], end=' ')
	print()


for tt in range(int(input())):
	x = input()
	p = list(x)
	x = int(x)
	print(len(p) - p.count('0'))
	n = 1
	while x != 0:
		if x % 10 != 0:
			print(x % 10 * n, end=' ')
		n *= 10
		x //= 10
	print()


count = int(input())
num = []
for k in range(count):
	num.append(input())
for k in range(count):
	if count == 1:
		print(num[k])
	else:
		length = len(num[k])
		output = []
		for i in num[k]:
			length = length - 1
			if i != '0':
				output.append(i + '0' * length)
		print(len(output))
		length2 = 0
		for j in output:
			length2 = length2 + 1
			if length2 == len(output):
				print(j)
			else:
				print(j, end=' ')


t = int(input())
for k in range(t):
	x = input()
	l = []
	for i in range(len(x)):
		a = x[i] + '0' * (len(x) - (i + 1))
		if int(a) > 0:
			l.append(int(a))
	print(len(l))
	for j in l:
		print(j, end=' ')
	print('\n')


t = int(input())
for x in range(t):
	n = int(input())
	i = 1
	ans = []
	while n:
		rem = n % 10
		if rem:
			ans.append(rem * i)
		n //= 10
		i *= 10
	print(len(ans), *ans)


n = int(input())
for j in range(n):
	inp = input()
	l = len(inp)
	print(l - inp.count('0'))
	res = []
	for i in range(l):
		if inp[i] == '0':
			continue
		res.append(inp[i] + ('0' * (l - i - 1) if l - i - 1 > 0 else ''))
	print(' '.join(res))


t = int(input(''))
while t > 0:
	n = int(input(''))
	m = 1
	count = 0
	l = []
	while n >= 1:
		if n % 10 != 0:
			l.append(n % 10 * m)
			count += 1
		n = n // 10
		m *= 10
	print(count)
	for i in l:
		print(i, end=' ')
	print()
	t -= 1


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


a = int(input())
i = 0
while i < a:
	b = int(input())
	c = []
	i += 1
	while b > 0:
		c.append(b % 10)
		b //= 10
	cnt = 0
	for x in c:
		if x != 0:
			cnt += 1
	print(cnt)
	for j in range(len(c)):
		if c[j] == 0:
			continue
		print(c[j] * 10 ** j, end=' ')
	print('')


t = int(input())
for i in range(t):
	z = int(input())
	x = z
	y = 0
	p = 10
	l = []
	q = 0
	while y != z:
		if x % p == 0:
			pass
		else:
			y = y + x % p
			x = x - x % p
			l.append(y - q)
		p = p * 10
		q = y
	print(len(l))
	print(*l)


for _ in range(int(input())):
	number = input()
	ans = []
	j = 0
	for i in range(len(number) - 1, -1, -1):
		if int(number[i]) == 0:
			j += 1
		else:
			ans.append(int(number[i]) * pow(10, j))
			j += 1
	print(len(ans))
	print(*ans)


cantidad = int(input())
cifras = 0
multiplicador = 0
for x in range(cantidad):
	y = str(input())
	cifras = len(y)
	print(len(y) - y.count('0'))
	for z in y:
		if z != '0':
			print(z, '0' * (cifras - 1), sep='', end=' ')
		cifras -= 1
	print('')


def Solve(n):
	res = []
	cur = 1
	while n > 0:
		val = n % 10
		if val > 0:
			res.append(int(val * cur))
		n = n // 10
		cur = cur * 10
	print(len(res))
	for i in res:
		print(i, end=' ')
	print('')
Q = int(input())
for i in range(0, Q):
	Solve(int(input()))


def convert(n):
	s = [str(d) for d in n]
	res = ' '.join(s)
	return res
t = int(input())
i = 0
x = []
for i in range(t):
	n = int(input())
	x.append(n)
for n in x:
	k = []
	p = 10000
	while n != 0:
		l = n // p * p
		p = p // 10
		k.append(l)
		if l == 0:
			k.remove(0)
		n = n - l
	print(len(k))
	print(convert(k))
	i += 1


for _ in range(int(input())):
	num = input()
	e = 1
	ls = []
	for i in reversed(num):
		if i != '0':
			ls.append((ord(i) - 48) * e)
		e *= 10
	print(len(ls))
	for i in ls:
		print(i, end=' ')
	print()


def solve():
	n = int(input())
	base = 10 ** 4
	arr = []
	while n:
		if n // base > 0:
			arr.append(n - n % base)
			n %= base
		base //= 10
	print(len(arr))
	for i in arr:
		print(i, end=' ')
t = int(input())
for i in range(t):
	solve()


t = int(input())
for i in range(t):
	n = input()
	ans = []
	ind = len(n) - 1
	for d in n:
		if int(d) != 0:
			ans.append(int(d) * 10 ** ind)
		ind -= 1
	answer = ''
	for a in ans:
		answer += str(a) + ' '
	print(len(ans))
	print(answer)


for p in range(0, int(input())):
	n = input()
	res = []
	for i in range(0, len(n)):
		if int(n[i]) != 0:
			res.append(int(n[i]) * 10 ** (len(n) - i - 1))
	print(len(res))
	for i in range(0, len(res)):
		if i != len(res) - 1:
			print(res[i], end=' ')
		else:
			print(res[i])


t = int(input())
for i in range(t):
	n = int(input())
	num = n
	c = 0
	ls = []
	while n != 0:
		rem = n % 10
		val = rem * pow(10, c)
		if val > 0:
			ls.append(val)
		c += 1
		n = n // 10
	print(len(ls))
	print(*ls)


t = int(input())
result = []
for _ in range(t):
	n = int(input())
	length = len(str(n))
	result = []
	while length:
		first = n // pow(10, length - 1)
		if first:
			check_value = first * pow(10, length - 1)
			n -= check_value
			length -= 1
			result.append(check_value)
		else:
			length -= 1
	print(len(result))
	print(' '.join(map(str, result)))


for _ in range(int(input())):
	n = int(input())
	a = []
	power = 0
	while n > 0:
		rem = n % 10
		if rem != 0:
			a.append((rem, power))
		n = n // 10
		power += 1
	print(len(a))
	for elem in a:
		print(elem[0] * pow(10, elem[1]), end=' ')
	print()


testCases = int(input())
res = []
while testCases:
	s = input()
	counter = 0
	ans = []
	a = {}
	for i in range(0, len(s)):
		if int(s[i]) > 0:
			counter += 1
			x = s[i]
			for i in range(len(s) - i - 1):
				x += '0'
			ans.append(int(x))
	a[counter] = ans
	res.append(a)
	testCases -= 1
for i in res:
	for j in i:
		print(j)
		print(*i[j], sep=' ')


n = int(input())
for j in range(n):
	s = input()
	a = []
	for i in range(len(s)):
		if s[i] != '0':
			a.append(int(s[i]) * 10 ** (len(s) - i - 1))
	if len(a) == 0:
		print(1, 0, sep='\n')
	else:
		print(len(a))
		print(*a)


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(len(ans))
	print(*ans)


for ad in range(int(input())):
	n = input()
	s = ''
	l = []
	x = []
	for i in range(len(n)):
		l.append(int(n[i]) * 10 ** (len(n) - i - 1))
	for i in l:
		if i != 0:
			x.append(int(i))
	print(len(x))
	for i in range(len(x)):
		if i != len(x) - 1:
			print(x[i], end=' ')
		else:
			print(x[i])


def solve(n):
	n = str(n)
	mult = 1
	sol = []
	for d in reversed(n):
		if d != '0':
			sol.append(int(d) * mult)
		mult *= 10
	return sol
t = int(input())
for _ in range(t):
	n = int(input())
	sol = solve(n)
	print(len(sol))
	print(*sol)


t = int(input())
while t != 0:
	s = input()
	x = int(s)
	l = []
	y = len(s) - 1
	for i in range(len(s)):
		if int(s[i]) * 10 ** y != 0:
			l.append(str(int(s[i]) * 10 ** y))
		y = y - 1
	print(len(l))
	print(' '.join(l))
	t = t - 1


t = int(input())
while t > 0:
	t -= 1
	inp = input()
	inp = inp[::-1]
	a = []
	x = ''
	for i in inp:
		a.append(int(i))
	fin = []
	for i in range(len(a)):
		a[i] *= 10 ** i
	for i in a:
		if i != 0:
			fin.append(i)
	print(len(fin))
	for i in fin:
		print(i, end=' ')
	print()


t = int(input())
a = []
b = 0
c = []
while b < t:
	b += 1
	n = int(input())
	a.append(n)
for x in a:
	y = len(str(x))
	while y > 0:
		y -= 1
		p = x - x % 10 ** y
		x = x - p
		if p == 0:
			pass
		elif p != 0:
			c.append(p)
	print(len(c))
	print(*c)
	c.clear()


def roundnumber(n):
	n = str(n)
	ans = []
	for j in range(len(n)):
		dig = []
		if n[j] != '0':
			dig.append(n[j])
			zero = ['0'] * (len(n) - (j + 1))
			dig += zero
			st = ''.join(dig)
			ans.append(int(st))
	return ans
test = int(input())
for i in range(test):
	n = int(input())
	z = roundnumber(n)
	print(len(z))
	print(*z)


t = int(input())

def solve(n):
	sum1 = 0
	l = []
	while n > 0:
		k = n % 10
		l.append(k)
		if k != 0:
			sum1 += 1
		n //= 10
	k = 1
	print(sum1)
	for i in range(0, len(l)):
		if l[i] != 0:
			print(l[i] * k, end=' ')
			k *= 10
		else:
			k *= 10
	print()
while t:
	t -= 1
	n = int(input())
	solve(n)


for i in range(int(input())):
	k = int(input())
	a = str(k)
	a = a[::-1]
	c = 0
	d = []
	for i in range(len(a)):
		if str(a[i]) != '0':
			c = int(a[i]) * 10 ** i
			d.append(c)
	print(len(d))
	d = ' '.join((str(i) for i in d))
	print(d)


integer = int
string = str
length = len

def fun(n):
	n.reverse()
	ans = []
	for i in range(length(n)):
		if n[i] != '0':
			ans.append(integer(n[i]) * 10 ** i)
	print(length(ans))
	print(*ans)

def main():
	for _ in range(integer(input())):
		num = list(input())
		fun(num)
main()


for _ in range(int(input())):
	a = input()
	out = []
	j = 0
	count = 0
	for i in a[::-1]:
		if i != '0':
			count += 1
			out.append(int(i + '0' * j))
		j += 1
	print(count)
	print(*out)


t = int(input())
for i in range(t):
	n = int(input())
	s = 0
	nums = []
	s = len(str(n)) - str(n).count('0')
	print(s)
	for num in list(str(n))[::-1]:
		if num != '0':
			nums.append(int(num) * 10 ** list(str(n))[::-1].index(num))
			n -= int(num) * 10 ** list(str(n))[::-1].index(num)
	print(' '.join((str(x) for x in nums[::-1])))


t = int(input())
for _ in range(t):
	a = int(input())
	if a < 1:
		print(a)
	else:
		a = str(a)
		ans = ''
		num = 0
		for i in range(len(a)):
			if a[i] != '0':
				num += 1
				ans += str(a[i]) + '0' * (len(a) - i - 1) + ' '
		print(num)
		print(ans)


import sys
t = int(input())
for _ in range(t):
	n = str(input())
	cnt = 0
	for c in n:
		if c != '0':
			cnt += 1
	print(cnt)
	for i in range(len(n)):
		if n[i] != '0':
			print(n[i], end='')
			for j in range(len(n) - i - 1):
				print(0, end='')
			print('', end=' ')
	print()


a = int(input())
for _ in range(a):
	z = int(input())
	aa = []
	x = 0
	while z > 0:
		y = z - z // 10 * 10
		if y > 0:
			aa.append(y * 10 ** x)
		x = x + 1
		z = z // 10
	print(len(aa))
	print(*aa)


t = int(input())

def main():
	num = int(input())
	if num < 10:
		print(1)
		print(num)
		return ()
	digits = list(str(num))
	summands = 0
	a = []
	for k in range(len(digits)):
		if digits[k] == '0':
			pass
		else:
			summands += 1
			a.append(int(digits[k]) * 10 ** (len(digits) - 1 - k))
	print(summands)
	for k in a:
		print(k)
	return ()
for _ in range(t):
	main()


for i in range(int(input())):
	n = int(input())
	l = n
	i = 0
	j = 1
	count = 0
	li = []
	while i <= len(str(l)):
		m = n % (10 * j)
		if m != 0:
			count += 1
			li.append(m)
		j = j * 10
		n = n - m
		i += 1
	print(count)
	for i in li:
		print(i, end=' ')
	print()
	li = []
	count = 0


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


T = int(input())
for i in range(T):
	num = int(input())
	c = 1
	pos_nums = []
	while num != 0:
		z = num % 10
		pos_nums.append(z * c)
		num = num // 10
		c = c * 10
	p = []
	for j in pos_nums:
		if j != 0:
			p.append(j)
		else:
			pass
	print(len(p))
	print(*p)


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


test = int(input())
for _ in range(test):
	n = int(input())
	s = str(n)
	ans = []
	for i in range(len(s)):
		if int(s[i]) == 0:
			continue
		ans.append(int(s[i]) * 10 ** (len(s) - 1 - i))
	print(len(ans))
	print(*ans)


import math
import random
import sys
import time
t = int(input())
while t > 0:
	t = t - 1
	ans = 0
	s = input()
	for c in range(0, len(s)):
		if s[c] != '0':
			ans = ans + 1
	print(ans)
	for c in range(0, len(s)):
		if s[c] != '0':
			print(s[c], end='')
			for d in range(c + 1, len(s)):
				print(0, end='')
			print(' ', end='')
	print()


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


t = int(input())
while t:
	i = int(input())
	ans = []
	c = 1
	while i > 0:
		j = i % 10
		if j:
			ans.append(j * c)
		c = c * 10
		i = i // 10
	print(len(ans))
	print(*ans)
	t -= 1


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


t = int(input())
for i in range(t):
	n = input()
	k = len(n) - n.count('0')
	print(k)
	ans = []
	for j in range(len(n)):
		if n[j] == '0':
			continue
		else:
			ans.append(n[j] + (len(n) - j - 1) * '0')
	print(*ans)


import math

def main():
	t = int(input())
	for _ in range(t):
		n = [int(a) for a in input()]
		n = n[::-1]
		n = [int(math.pow(10, i) * n[i]) for i in range(len(n))]
		n = [a for a in n if a != 0]
		print(len(n))
		for i in n:
			print(i, end=' ')
		print()
main()


for t in range(int(input())):
	n = input()
	numbers = []
	cont = 0
	cont2 = 0
	for x in reversed(n):
		if x != '0':
			numbers.append(x + cont * '0')
			cont2 += 1
			cont += 1
		else:
			cont += 1
	print(cont2)
	numbers2 = ''
	for x in reversed(numbers):
		numbers2 = numbers2 + x + ' '
	print(numbers2)


def solve(n):
	res = []
	k = 1
	while n > 0:
		if n % 10 != 0:
			res.append(n % 10 * k)
		n = n // 10
		k = k * 10
	print(len(res))
	print(' '.join(map(str, res)))
n = int(input())
for i in range(0, n):
	solve(int(input()))


a = int(input())
p = list()
d = int(0)
for i in range(a):
	b = input()
	c = len(b)
	for j in range(c):
		b1 = int(b[j])
		if b1 > 0:
			d = d + 1
			p.append(b1 * 10 ** (c - j - 1))
	print(d)
	print(*p)
	d = 0
	p = list()


t = int(input())
p = 0
while p < t:
	m = 0
	p = p + 1
	count = 0
	n = int(input())
	f = n
	while n > 9:
		l = n % 10 ** (len(str(n)) - 1)
		if l != 0:
			count = count + 1
		else:
			count = count + 1
		n = l
	if n <= 9 and n > 0:
		count = count + 1
	print(count)
	d = -1
	n = f
	while m < t and n > 0:
		m = m + 1
		while n > 9:
			l = n % 10 ** (len(str(n)) - 1)
			if l != 0:
				print(n - l, end=' ')
			else:
				print(n - l)
			n = l
	if n <= 9 and n > 0:
		print(n)
		n == -1


def soln(n):
	result = []
	ns = str(n)
	for (i, c) in enumerate(ns):
		if c != '0':
			curr = c + (len(ns) - i - 1) * '0'
			result.append(curr)
	return result

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		result = soln(n)
		print(len(result))
		print(' '.join((str(x) for x in result)))
main()


import sys
import math as mt
t = int(input())
for __ in range(t):
	s = input()
	if len(s) == 1:
		print(1)
		print(s)
	else:
		ans1 = ''
		ans2 = ''
		ans3 = ''
		ans4 = ''
		k = 0
		z = 0
		for i in range(len(s) - 1, -1, -1):
			if s[i] != '0':
				k += 1
				if k == 1:
					ans1 += s[i]
					for j in range(z):
						ans1 += '0'
				if k == 2:
					ans2 += s[i]
					for j in range(z):
						ans2 += '0'
				if k == 3:
					ans3 += s[i]
					for j in range(z):
						ans3 += '0'
				if k == 4:
					ans4 += s[i]
					for j in range(z):
						ans4 += '0'
			z += 1
		l = []
		l.append(ans1)
		l.append(ans2)
		l.append(ans3)
		l.append(ans4)
		print(k)
		for i in range(k):
			print(l[i], end=' ')
		print()


t = int(input())
ans = []
counter = []
prans = ''
prcounter = 0
for i in range(t):
	N = input()
	R = len(N) - 1
	for digit in N:
		if digit != '0':
			prans += digit + '0' * R + ' '
			prcounter += 1
		R -= 1
	ans.append(prans)
	counter.append(prcounter)
	prans = ''
	prcounter = 0
for i in range(len(ans)):
	print(counter[i])
	print(ans[i])


import sys
import random
import math
from sys import stdin, stdout

def get_ints():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()
n = int(input())
a = [0] * int(n)
for i in range(0, n):
	a[i] = int(input())
for i in range(0, n):
	k = 0
	s = [0] * 5
	d = 0
	while a[i] > 0:
		if a[i] % 10 == 0:
			a[i] //= 10
			d += 1
		else:
			s[k] = a[i] % 10 * 10 ** d
			a[i] //= 10
			k += 1
			d += 1
	print(k)
	print(*s[:k])


t = int(input())
for _ in range(t):
	n = int(input())
	if n == 10000:
		print(1)
		print(10000)
		continue
	answer = []
	ones = n % 10
	if ones:
		answer.append(ones)
		n -= ones
	tens = n % 100
	if tens:
		answer.append(tens)
		n -= tens
	hundreds = n % 1000
	if hundreds:
		answer.append(hundreds)
		n -= hundreds
	thousands = n
	if thousands:
		answer.append(thousands)
	print(len(answer))
	print(' '.join((str(num) for num in answer)))


t = int(input())
while t != 0:
	n = str(input())
	arr = []
	for i in range(len(n)):
		if n[i] != '0':
			arr.append(n[i] + '0' * (len(n) - i - 1))
	print(len(arr))
	for i in arr:
		print(i, end=' ')
	print('\n')
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	l = []
	i = n
	c = 0
	while i != 0:
		if i % 10 == 0:
			i = i // 10
			c = c + 1
			continue
		nu = i % 10 * 10 ** c
		l.append(nu)
		c = c + 1
		i = i // 10
	print(len(l))
	for j in l:
		print(j, end=' ')
	print()


for _ in range(int(input())):
	L = list(input())
	ans = []
	n = len(L)
	count = 0
	for i in range(n):
		if L[i] != '0':
			L[i] = int(L[i])
			val = L[i] * 10 ** (n - i - 1)
			ans.append(val)
	print(len(ans))
	print(*ans)


n = int(input())
for i in range(n):
	l = list(input())
	print(len(l) - l.count('0'))
	m = []
	if len(l) == 1:
		print(l[0])
	else:
		for i in range(1, len(l) + 1):
			if int(l[i - 1]) * 10 ** (len(l) - i) != 0:
				m.append(int(l[i - 1]) * 10 ** (len(l) - i))
			else:
				continue
		l2 = [str(x) for x in m]
		print(' '.join(l2))


t = int(input())
for _ in range(t):
	n = input()
	values = []
	counter = 0
	for i in range(len(n)):
		cur = int(n[i])
		if cur != 0:
			values.append(cur * 10 ** (len(n) - i - 1))
			counter += 1
	print(counter)
	print(' '.join([str(x) for x in values]))


t = int(input())
for i in range(t):
	lst = []
	n = int(input())
	c = 0
	while n > 0:
		c += 1
		v = n % 10 * pow(10, c - 1)
		if v is not 0:
			lst.append(v)
		n = n // 10
	print(len(lst))
	for i in lst:
		print(i, end=' ')


def solve(x):
	ans = []
	p10 = 10
	while x > 0:
		if x % p10 > 0:
			ans.append(x % p10)
		x -= x % p10
		p10 *= 10
	return sorted(ans)
cases = int(input())
for _ in range(cases):
	ans = solve(int(input()))
	print(len(ans))
	print(*ans)


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


for i in range(int(input())):
	res = ''
	input2 = input()
	a = '0' * (len(str(input2)) - 1)
	if str(input2)[1:] == a:
		res += str(input2)
	elif len(input2) == 2:
		res += str(int(input2[0]) * 10) + ' ' + str(int(input2[1]))
	elif len(input2) == 3:
		res += str(int(input2[0]) * 100) + ' ' + str(int(input2[1]) * 10) + ' ' + str(input2[2])
	elif len(input2) == 4:
		res += str(int(input2[0]) * 1000) + ' ' + str(int(input2[1]) * 100) + ' ' + str(int(input2[2]) * 10) + ' ' + str(input2[3])
	elif len(input2) == 5:
		res += str(int(input2[0]) * 10000) + ' ' + str(int(input2[1]) * 1000) + ' ' + str(int(input2[2]) * 100) + ' ' + str(int(input2[3]) * 10) + ' ' + str(input2[4])
	res = res.split()
	cnt = 0
	res1 = ''
	for j in res:
		if j == '0':
			pass
		else:
			res1 += j + ' '
			cnt += 1
	print(cnt)
	print(res1)


for i in range(int(input())):
	s = input()
	a = []
	q = len(s) - 1
	for c in s:
		if c != '0':
			a.append(c + '0' * q)
		q -= 1
	print(len(a))
	print(*a)


t = int(input())
for i in range(t):
	n = input()
	c = 0
	nums = []
	n_reversed = n[::-1]
	for k in range(len(n)):
		if n_reversed[k] != '0':
			c += 1
			nums.append(n[len(n) - k - 1:])
			n_list = list(n)
			n_list[len(n) - k - 1] = '0'
			n = ''.join(n_list)
	print(c)
	print(*nums)


T = int(input())
for t in range(T):
	n = input()
	print(sum([1 if n[i] != '0' else 0 for i in range(len(n))]))
	for i in range(len(n)):
		if n[i] != '0':
			print(n[i] + '0' * (len(n) - i - 1), end=' ' if i < len(n) - 1 else '\n')


T = int(input())
for _ in range(T):
	n = int(input())
	if n < 10:
		print(1)
		print(n)
	else:
		n = str(n)
		ln = len(n)
		answer = []
		for i in range(ln):
			if n[i] == '0':
				pass
			else:
				numOfZero = ln - i - 1
				zero = '0' * numOfZero
				ans = n[i] + zero
				answer.append(ans)
		print(len(answer))
		for i in answer:
			print(int(i), end=' ')
		print()


t = int(input())
for i in range(t):
	l = list(input())
	l = [int(x) for x in l]
	l.reverse()
	ans = []
	for i in range(0, len(l)):
		a = l[i] * 10 ** i
		w = 0
		for j in l:
			if j != 0:
				w += 1
		if a != 0:
			ans.append(a)
	print(w)
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = input()
	if n.count('0') == len(n) - 1:
		print('1')
		print(n)
	else:
		n = int(n)
		vals = []
		i = 0
		while n > 0:
			m = n % 10
			if m != 0:
				vals.append(10 ** i * m)
			n //= 10
			i += 1
		vals = vals[::-1]
		print(len(vals))
		print(' '.join(map(str, vals)))


t = int(input())
answ = []
for i in range(t):
	n = input()
	a = int(len(n) - n.count('0'))
	k = len(n)
	h = ''
	for j in range(k):
		if n[j] != '0':
			if j == k - 1:
				h += str(int(n[j]) * 10 ** (k - j - 1))
			else:
				h += str(int(n[j]) * 10 ** (k - j - 1)) + ' '
	h = h.strip()
	answ.append(a)
	answ.append(h)
for i in range(len(answ)):
	print(answ[i])


N = int(input())
for x in range(N):
	X = list(map(int, str(input())))
	A = []
	for i in range(len(X)):
		Y = X[i] * 10 ** (len(X) - i - 1)
		if Y != 0:
			A.append(Y)
	print(len(A))
	print(' '.join(map(str, A)))


def snake():
	a = input()
	list_1 = []
	output_list = []
	for i in range(int(a)):
		a = input()
		a = a[::-1]
		numb_digits = len(a)
		count = 0
		appending_str = ''
		for (loc, i) in enumerate(a):
			if not i == '0':
				count += 1
				appending_str += i + '0' * loc + ' '
		output_list.append(str(count) + '\n' + appending_str)
	print('\n'.join(output_list))
snake()


x = int(input())
list1 = []
list2 = []
list3 = []
for i in range(x):
	z = input()
	for i in z:
		list1.append(i)
	l = len(list1)
	test_list = [int(i) for i in list1]
	for i in test_list:
		if l >= 1:
			list2.append(i * 10 ** (l - 1))
			l -= 1
	for i in list2:
		if i != 0:
			list3.append(i)
	print(len(list3))
	for i in list3:
		print(i)
	list1 = []
	list2 = []
	list3 = []


test = int(input())
for j in range(test):
	num = int(input())
	k = len(str(num))
	count = 0
	i = 0
	ans = ''
	while num != 0:
		rim = num % 10 * 10 ** i
		num = num // 10
		i += 1
		if rim != 0:
			count += 1
			ans = ans + ' ' + str(rim)
	print(count)
	print(ans)
	print('\n')


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


total = int(input())
while total:
	num = input()
	l = len(num)
	nl = []
	for i in num:
		nl.append(int(i))
	count = 0
	number = []
	for i in nl:
		x = int(str(i).ljust(l, '0'))
		if x != 0:
			count += 1
			number.append(x)
		l -= 1
	print(count)
	for i in range(len(number)):
		print(number[i], end=' ')
	total -= 1


t = int(input())
for d in range(t):
	n = int(input())
	x = str(n)
	arr = []
	if len(x) == 1 or n % 10 ** (len(x) - 1) == 0:
		print(1)
		print(n)
	elif len(x) > 1:
		for i in range(len(x)):
			g = int(x[i]) * 10 ** (len(x) - i - 1)
			if g != 0:
				arr.append(g)
			elif g == 0:
				continue
		print(len(arr))
		for i in range(len(arr)):
			print(arr[i], end=' ')


def intToList(a):
	s = []
	i = 0
	while a >= 1:
		b = a % 10
		if b != 0:
			s.append(b * 10 ** i)
		a = a // 10
		i += 1
	return s
t = int(input())
for i in range(t):
	n = int(input())
	lis = intToList(n)
	print(len(lis))
	print(' '.join((str(x) for x in lis)))


for _ in range(int(input())):
	A = {a + '0' * i for (i, a) in enumerate(input()[::-1]) if a != '0'}
	print(len(A))
	print(*A)


import sys
input = sys.stdin.readline
t = int(input())
for r in range(t):
	n = str(int(input()))
	n = n[::-1]
	ans = ''
	x = len(n)
	counter = 0
	for j in range(x):
		if n[j] != '0':
			counter += 1
			ans += str(10 ** j * int(n[j])) + ' '
	print(counter)
	print(ans)


for _ in range(int(input())):
	n = int(input())
	l = []
	for i in range(5):
		if n % 10 != 0:
			l += [n % 10 * pow(10, i)]
		n = n // 10
		if n == 0:
			break
	print(len(l))
	for x in l:
		print(x, end=' ')


import math
t = int(input())
while t > 0:
	ans = 0
	a = ''
	n = int(input())
	count = math.floor(math.log10(n) + 1)
	if n <= 10:
		ans += 1
		a = a + str(n)
	else:
		for i in range(count):
			v = n % 10
			if v != 0:
				a = a + str(int(v * 10 ** i)) + ' '
				ans += 1
			n = n // 10
	print(ans)
	print(a)
	t -= 1


from sys import stdout
T = int(input())
for m in range(1, T + 1):
	N = int(input())
	L = []
	N = str(N)
	for i in range(0, len(N)):
		if N[i] != '0':
			L.append(int(N[i]) * 10 ** (len(N) - i - 1))
	print(len(L))
	for k in L:
		stdout.write(str(k))
		stdout.write(' ')
		if L.index(k) == len(L) - 1:
			print(' ')


for i in range(int(input())):
	n = input()
	l = len(n) - 1
	res = []
	for nn in n:
		if int(nn) > 0:
			res.append(int(nn) * 10 ** l)
		l -= 1
	print(len(res))
	print(*res)


import sys
input = sys.stdin.readline
t = int(input())
for ti in range(1, t + 1):
	n = int(input())
	res = []
	base = 1
	while n > 0:
		while n > 0 and n % 10 == 0:
			n //= 10
			base *= 10
		cur = n % 10 * base
		n -= n % 10
		res.append(cur)
	print(len(res))
	print(*res)


import sys

def numbers(num):
	count = 0
	l1 = []
	place = 1
	while num != 0:
		x = num % 10
		num = num // 10
		if x != 0:
			count += 1
			l1.append(x * place)
		place *= 10
	print(count)
	for i in l1:
		print(i, end=' ')
data = sys.stdin.readline()
d = int(data)
for line in sys.stdin:
	if line.strip() == '':
		break
	numbers(int(line.strip()))
	d -= 1
	if d == 0:
		break


for _ in range(int(input())):
	n = int(input())
	a = []
	for (i, d) in enumerate(str(n)[::-1]):
		if int(d) != 0:
			a.append(d + '0' * i)
	print(len(a))
	print(' '.join(a[::-1]))


for _ in range(int(input())):
	s = input()
	c = s.count('0')
	n = len(s)
	print(n - c)
	for i in range(n - 1, -1, -1):
		if s[i] != '0':
			print(s[i] + str(0) * (n - i - 1), end=' ')
	print()


n = int(input())
ans = []
for i in range(n):
	d = input()
	dc = []
	for j in range(len(d)):
		if d[j] != '0':
			dc.append(d[j] + '0' * (len(d) - 1 - j))
	ans.append(dc)
for a in ans:
	print(len(a))
	for k in a:
		print(k, end=' ')
	print()


for _ in range(int(input())):
	n = input()
	l = list(n)
	p = l.count('0')
	print(len(l) - p)
	m = []
	r = len(l) - 1
	for i in range(len(l)):
		m.append(int(l[i]) * 10 ** r)
		r = r - 1
	while m.count(0):
		m.remove(0)
	print(*m)


import sys
strings = iter(sys.stdin.read().split())
ints = (int(x) for x in strings)
sys.setrecursionlimit(3000)

def main():
	ntc = next(ints)
	for tc in range(ntc):
		n = next(ints)
		ans = []
		i = 0
		while n:
			if n % 10 != 0:
				ans.append(n % 10 * 10 ** i)
			n //= 10
			i += 1
		print(len(ans))
		print(*ans)
	return
main()


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


t = int(input())
for i in range(t):
	s = []
	a = int(input())
	b = 0
	while 1:
		r = a % 10
		if r != 0:
			s.append(r * 10 ** b)
		b += 1
		q = int(a / 10)
		a = q
		if q == 0:
			break
	print(len(s))
	for j in s:
		print(str(j) + ' ', end='')
	print('\n')


t = int(input())
for i in range(t):
	n = input()
	res = []
	r = 1
	cnt = 0
	for i in range(len(n) - 1, -1, -1):
		if int(n[i] * r) != 0:
			cnt = cnt + 1
		res.append(int(n[i]) * r)
		r = r * 10
	print(cnt)
	for i in res:
		if i != 0:
			print(i, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	c = 0
	e = []
	s = str(n)
	ln = len(str(n))
	for i in range(int(ln)):
		if s[i] != '0':
			c += 1
			e.append(int(s[i]) * 10 ** (ln - i - 1))
	print(c)
	for i in e:
		print(i, end=' ')


t = int(input())
while t:
	t -= 1
	data = int(input())
	if data < 10:
		print(1)
		print(data)
	else:
		count = 0
		data = str(data)
		for i in data:
			if i != '0':
				count += 1
		print(count)
		ans = ''
		for i in range(len(data)):
			if data[i] != '0':
				ans += str(int(data[i]) * 10 ** (len(data) - i - 1)) + ' '
		print(ans)


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


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


def sum_round_numbers(num):
	round_numbers = []
	power = 0
	while num >= 1:
		digit = num % 10
		if digit:
			round_numbers.append(digit * 10 ** power)
		num //= 10
		power += 1
	print(len(round_numbers))
	print(' '.join([str(i) for i in round_numbers]))
t = int(input())
for _ in range(t):
	sum_round_numbers(int(input()))


for i in range(int(input())):
	n = input()
	x = len(n) - 1
	a = list(n)
	b = []
	for i in range(len(n)):
		if int(a[i]) != 0:
			qw = a[i]
			qwe = '0' * x
			qw += qwe
			b.append(qw)
		x -= 1
	print(len(b))
	for i in range(len(b)):
		print(b[i], end=' ')


for _ in range(int(input())):
	n = int(input())
	a = 1
	m = []
	while n != 0:
		r = n % 10
		r = r * a
		if r != 0:
			m.append(r)
		n = n // 10
		a *= 10
	print(len(m))
	print(' '.join(list(map(str, m))))


t = int(input())
for _ in range(t):
	n = input()
	l = list(n)
	m = len(l)
	l1 = []
	for i in range(len(l)):
		l[i] = int(l[i])
		if l[i] != 0:
			l1.append(l[i] * 10 ** (m - i - 1))
	print(len(l1))
	for i in l1:
		print(i, end=' ')
	print()


import math
n = int(input())
for i in range(n):
	x = int(input())
	current_num = 0
	count = 0
	krug = list()
	n = 1
	while x != 0:
		current_num = int(x % math.pow(10, n))
		if current_num != 0:
			count += 1
			krug.append(current_num)
			x -= current_num
		n += 1
	print(count)
	print(*krug)


for _ in range(int(input())):
	n = int(input())
	if n <= 9 and n >= 1:
		print(1)
		print(n)
	else:
		l = []
		while n:
			l.append(n % 10)
			n = n // 10
		ans = []
		for i in range(len(l)):
			ans.append(10 ** i * l[i])
		res = []
		for i in range(len(ans)):
			if ans[i] != 0:
				res.append(ans[i])
		print(len(res))
		print(*res)


n = int(input())
for i in range(n):
	x = input()
	l1 = list(x)
	c = l1.count('0')
	l = len(x)
	print(l - c)
	for j in range(l):
		if x[j] != '0':
			print(str(x[j]) + '0' * (l - j - 1), end=' ')
	print('')


T = int(input())
for i in range(T):
	S = input()
	Count = 0
	P = []
	for i in range(len(S)):
		if S[i] != '0':
			P.append(int(S[i]) * 10 ** (len(S) - i - 1))
	print(len(P))
	for i in range(len(P)):
		if i != len(P) - 1:
			print(P[i], end=' ')
		else:
			print(P[i])


for _ in range(int(input())):
	n = str(int(input()))
	print(len(n) - n.count('0'))
	A = set()
	for i in range(len(n)):
		if n[i] != '0':
			A.add(int(n[i]) * 10 ** (len(n) - i - 1))
	print(*A, sep=' ')


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


def do(num):
	lis = []
	i = 0
	while num != 0:
		temp = num % 10
		if temp != 0:
			lis.append(temp * 10 ** i)
		num = num // 10
		i += 1
	print(len(lis))
	for item in lis[::-1]:
		print(item, end=' ')
	print('')
t = int(input())
for _ in range(t):
	do(int(input()))


def round_value(value):
	for i in range(len(value)):
		data = str(value[i])
		store = []
		while data:
			length = len(data) - 1
			if int(data[0]) != 0:
				v = int(data[0]) * 10 ** length
				store.append(v)
			data = data[1:]
		print(len(store))
		print(*store)
n = int(input())
value = []
for i in range(n):
	value.append(int(input()))
round_value(value)


t = int(input())
for _ in range(t):
	s = input()
	a = []
	z = '0'
	while len(s) > 0:
		x = s[0]
		s = s[1:]
		if x != '0':
			a.append(x + z * len(s))
	print(len(a))
	for i in a:
		print(i, end=' ')
	print()


import math

def main():
	t = int(input())
	for _ in range(t):
		n = input()
		if len(n) == 1:
			print(1)
			print(n)
			continue
		ans = 0
		s = ''
		for i in range(len(n)):
			c = n[len(n) - 1 - i]
			if c != '0':
				s += c
				for a in range(i):
					s += '0'
				s += ' '
				ans += 1
		print(ans)
		print(s)
main()


def iinput():
	return [int(i) for i in input().split()]
t = int(input())
for _ in range(t):
	n = input()
	ans = []
	lena = len(n) - 1
	for i in n:
		if i != '0':
			ans += [int(i) * 10 ** lena]
		lena -= 1
	print(len(ans))
	print(*ans)


try:
	test = int(input())
	for t in range(test):
		n = input()
		lst = list(n)
		lst = list(map(int, lst))
		l = len(lst)
		if l == 1:
			print('1')
			print(n)
		else:
			c = 0
			for i in lst:
				if i != 0:
					c += 1
			print(c)
			a = 10 ** (l - 1)
			for i in lst:
				if i != 0:
					print(int(a * i), end=' ')
				a /= 10
			print('')
except:
	pass


t = int(input())
for i in range(t):
	n = int(input())
	digits = []
	for i in range(1, 6):
		if n % 10 != 0:
			digits.append(n % 10 * 10 ** (i - 1))
		n = n // 10
	print(len(digits))
	for digit in digits:
		print(digit, end=' ')
	print()


n = [input() for i in range(int(input()))]
outputlist = []
for j in range(len(n)):
	for l in range(len(n[j])):
		if n[j][l] == '0':
			continue
		else:
			outputlist.append(f"{n[j][l]}{'0' * (len(n[j]) - l - 1)}")
	print(len(n[j]) - n[j].count('0'))
	print(*outputlist)
	outputlist = []


for s in [*open(0)][1:]:
	r = []
	i = 0
	for c in s[-2::-1]:
		r += ([], [c + '0' * i])[c > '0']
		i += 1
	print(len(r), *r)


def solve(n):
	a = []
	x = 1
	w = str(n)
	for i in range(len(w) - 1, -1, -1):
		if w[i] == '0':
			x *= 10
			continue
		a += [int(w[i]) * x]
		x *= 10
	a.reverse()
	print(len(a))
	print(*a)
tests = int(input())
while tests:
	tests -= 1
	solve(int(input()))


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	if n <= 10:
		print(1)
		print(n)
	else:
		cnt = 0
		li = list()
		i = 0
		while n > 0:
			z = n % 10
			d = z * 10 ** i
			if d != 0:
				li.append(d)
				cnt += 1
			n = int(n / 10)
			i += 1
		print(cnt)
		for x in li:
			print(x, end=' ')


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys
t = int(input())
for _ in range(t):
	n = int(input())
	ans = []
	cur_pow = 1
	while n > 0:
		while n % 10 == 0:
			cur_pow *= 10
			n //= 10
		ans.append(n % 10 * cur_pow)
		cur_pow *= 10
		n //= 10
	sys.stdout.write(str(len(ans)) + '\n')
	sys.stdout.write(' '.join([str(item) for item in ans]) + '\n')


for l in range(int(input())):
	a1 = int(input())
	d = []
	n = 1
	while a1 > 0:
		if a1 % 10 != 0:
			d.append(a1 % 10 * n)
		a1 = a1 // 10
		n = n * 10
	print(len(d))
	print(*d)


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


n = int(input())
for i in range(n):
	num = input()
	x = list()
	for i in range(len(num)):
		sumnum = int(num[i]) * 10 ** (len(num) - (i + 1))
		if sumnum == 0:
			continue
		else:
			x.append(sumnum)
	print(len(x))
	for i in x:
		print(i, end=' ')


for T in range(int(input())):
	n = int(input())
	count = 0
	out_lis = []
	while n:
		r = n % 10
		if r != 0:
			out = r * 10 ** count
			out_lis.append(out)
			count += 1
			n = n // 10
		else:
			count += 1
			n = n // 10
			continue
	print(len(out_lis))
	for i in out_lis:
		print(i, end=' ')
	print()


for i in range(int(input())):
	num = int(input())
	count = 1
	if num < 10:
		print(count)
		print(num)
	else:
		ll = list(str(num))
		addend = len(ll) - ll[1:].count('0')
		print(addend)
		print('\n')
		for j in range(len(ll)):
			if ll[j] != '0':
				print(ll[j] + '0' * (len(ll) - (j + 1)), end=' ')
		print('\n')


for i in range(int(input())):
	a = input()
	b = len(a)
	n = 1
	lis = []
	for i in range(b):
		if a[b - 1 - i] != '0':
			lis.append(int(a[b - 1 - i]) * n)
		n *= 10
	print(len(lis))
	print(*lis, sep=' ')


t = int(input())
for i in range(t):
	num = int(input())
	n = num
	k = 1
	while 1:
		l = len(str(n))
		if n % 10 ** (l - 1) != 0:
			n = n % 10 ** (l - 1)
			k += 1
		else:
			break
	print(k)
	n = num
	while 1:
		l = len(str(n))
		if n % 10 ** (l - 1) != 0:
			print(n // 10 ** (l - 1) * 10 ** (l - 1), end=' ')
			n = n % 10 ** (l - 1)
		else:
			print(n)
			break


def solution():
	s = input()
	l = len(s)
	res = []
	for i in range(l):
		if s[i] != '0':
			cnt = l - i - 1
			ns = s[i] + cnt * '0'
			res.append(ns)
	print(len(res))
	print(*res)
t = int(input())
for i in range(t):
	solution()


cases = int(input())
for case in range(cases):
	num = input()
	len_n = len(num)
	final = ''
	zeros = ''.join(['0' for i in range(len_n)])
	count = 0
	for l in num:
		if l == '0':
			zeros = zeros[:-1]
			pass
		else:
			count += 1
			zeros = zeros[:-1]
			final = final + l + zeros + ' '
	print(count)
	print(final[:-1])


k = int(input(''))
for j in range(k):
	n = input('')
	steps = len(n)
	rounds = []
	counter1 = 0
	counter2 = 0
	for i in n:
		if int(i) != 0:
			rounds.append(int(i + '0' * (steps - counter2 - 1)))
			counter1 += 1
		counter2 += 1
	print(counter1)
	for i in rounds:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	n = list(input())
	l = []
	c = 1
	for i in range(len(n)):
		if n[i] != '0':
			c += 1
			l.append(n[i] + '0' * (len(n) - i - 1))
		else:
			continue
	print(len(l))
	print(' '.join(l))


def solution(t):
	for _ in range(t):
		n = input()
		c = 0
		a = []
		for i in range(len(n)):
			if int(n[i]):
				c += 1
				a.append(n[i] + '0' * (len(n) - i - 1))
		print(c)
		print(*a)
solution(int(input()))


for i in range(int(input())):
	n = int(input())
	a = []
	cnt = 0
	while n != 0:
		d = n % 10
		if d != 0:
			a.append(d * pow(10, cnt))
		n = n // 10
		cnt += 1
	print(len(a))
	print(*a)


test_case = int(input())
counter = 1
while test_case > 0:
	number = list(input())
	number = [int(num) for num in number]
	length = len(number)
	final_output = ''
	space_counter = 0
	for x in number:
		if x != 0:
			space_counter += 1
			num_of_zeros = length - counter
			string = str(x) + num_of_zeros * '0' + ' '
			final_output = final_output + string
		counter += 1
	print(space_counter)
	print(final_output)
	test_case -= 1
	counter = 1


from collections import defaultdict as dc
from heapq import *
import math
from bisect import bisect_left, bisect
import sys
from collections import deque as dq
from heapq import heapify, heappush, heappop
mod = 10 ** 9 + 7

def sinp():
	p = str(input())
	return p

def inp():
	p = int(input())
	return p

def line():
	p = list(map(int, input().split()))
	return p

def read_mat():
	n = inp()
	a = []
	for i in range(n):
		a.append(line())
	return a

def digit(n):
	s = str(n)
	p = 0
	for i in s:
		p += int(i) ** 2
	return p

def check(p, i, j):
	z = i + (j - i) // 2
	if p[z] - p[i] == p[j] - p[z]:
		return j - i
	return 0

def solve(a):
	z = 0
	ans = []
	l = str(a)
	r = 1
	for i in range(len(l) - 1, -1, -1):
		p = int(l[i]) * r
		r = r * 10
		if p > 0:
			ans.append(p)
	return ans
for test in range(inp()):
	a = inp()
	l = solve(a)
	print(len(l))
	print(*l)


import math
n = int(input())
for i in range(n):
	num = 0
	test = int(input())
	round_int = list()
	now_digit = 0
	while True:
		d = test % 10
		test = int(test / 10)
		if d != 0:
			num += 1
			if now_digit == 0:
				round_int.append(d)
			else:
				round_int.append(d * math.pow(10, now_digit))
		now_digit += 1
		if test == 0:
			break
	print(num)
	for i in round_int:
		print(int(i))


for _ in range(int(input())):
	n = int(input())
	k = 1
	ans = []
	while n // k > 0:
		val = n // k
		rem = val % 10
		if rem != 0:
			ans.append(rem * k)
		k *= 10
	print(len(ans))
	print(' '.join(map(str, ans)))


q = int(input())
c = []
e = []
for i in range(q):
	a = input()
	for i in range(len(a)):
		e.append(int(a[i]))
	for i in range(len(e)):
		if e[i] == 0:
			continue
		else:
			b = len(e[i:])
			d = '0' * (b - 1)
			c.append(str(e[i]) + d)
	print(len(c))
	for i in c:
		print(i, end=' ')
	c = []
	e = []


t = int(input())
for i in range(t):
	n = int(input())
	s = str(n)
	l = []
	for i in range(len(s)):
		if s[i] == '0':
			continue
		else:
			l.append(int(s[i]) * 10 ** (len(s) - i - 1))
	print(len(l))
	for i in range(len(l)):
		print(l[i], end=' ')
	print()


5090
t = int(input())
while t > 0:
	n = int(input())
	c = 0
	l = []
	while n > 0:
		if n % 10 == 0:
			n = n // 10
			c += 1
		else:
			k = n % 10 * 10 ** c
			l.append(k)
			c += 1
			n = n // 10
	print(len(l))
	for i in l:
		print(i, end=' ')
	t -= 1


for i in range(int(input())):
	n = int(input())
	arr = []
	arr.append(n // 1000 * 1000)
	a = n // 1000
	n -= a * 1000
	arr.append(n // 100 * 100)
	a = n // 100
	n -= a * 100
	arr.append(n // 10 * 10)
	a = n // 10
	n -= a * 10
	arr.append(n)
	nArr = []
	for g in range(len(arr)):
		if arr[g] != 0:
			nArr.append(arr[g])
	print(len(nArr))
	print(*nArr)


total = int(input())
for i in range(total):
	n = input()
	m = len(n)
	r = []
	for j in range(m):
		if n[j] != '0':
			r += [n[j] + '0' * (m - 1 - j)]
	print(len(r))
	print(*r)


t = int(input())
for i in range(t):
	n = int(input())
	cn = n
	cnt = 0
	while cn > 0:
		if int(cn % 10) != 0:
			cnt = cnt + 1
		cn = int(cn / 10)
	print(cnt)
	power = 1
	while n > 0:
		to_print = int(n % 10) * power
		if to_print != 0:
			print(to_print)
		power *= 10
		n = int(n / 10)


z = int(input())
for i in range(z):
	n = int(input())
	nombredechiffre = len(str(n))
	resultat = []
	m = str(n)[::-1]
	for i in range(len(m)):
		resultat.append(10 ** i * int(m[i]))
	resultat = [i for i in resultat if i != 0]
	print(len(resultat))
	print(' '.join([str(i) for i in resultat]))


for i in range(int(input())):
	line = input()
	tempresult = []
	for i in range(len(line)):
		if int(line[i:]) != 0:
			if int(line[i]) != 0:
				tempresult.append(str(int(line[i]) * 10 ** len(line[i + 1:])))
		else:
			break
	print(len(tempresult))
	print(' '.join(tempresult))


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


a = list(map(int, input().split()))
t = a[0]
while t > 0:
	l = []
	b = list(map(int, input().split()))
	n = b[0]
	while n > 0:
		l.append(n % 10)
		n = n // 10
	for i in range(len(l)):
		for j in range(i + 1, len(l)):
			l[j] *= 10
	count = 0
	for i in range(len(l)):
		if l[i] > 0:
			count += 1
	print(count)
	for m in range(len(l) - 1, -1, -1):
		if l[m] > 0:
			if m > 0:
				print(l[m], end=' ')
			else:
				print(l[m])
		elif m == 0:
			print()
	t -= 1


T = int(input())
for t in range(T):
	n = int(input())
	ans = []
	ans_num = 0
	cnt = 0
	while n > 0:
		tmp = n % 10
		if tmp > 0:
			ans.append(tmp * 10 ** cnt)
			ans_num += 1
		n //= 10
		cnt += 1
	print(ans_num)
	print(*ans)


n = int(input())
inpt = []
for i in range(n):
	inpt.append(int(input()))
for j in inpt:
	res = list(map(int, str(j)))
	length = len(res)
	final = []
	count = 0
	for i in res:
		if i != 0:
			final.append(i * 10 ** (length - 1))
			count += 1
			length -= 1
		else:
			length -= 1
	print(count)
	print(*final, sep=' ')


for i in range(int(input())):
	t = []
	k = input()
	[t.append(j) for j in k if int(j) != 0]
	if len(k) == 1 or k.count('0') == len(k) - 1:
		print(1)
		print(k)
	else:
		print(len(t))
		r = []
		[r.append(int(k[j]) * 10 ** (len(k) - j - 1)) for j in range(len(k)) if k[j] != '0']
		print(*r)


for i in range(int(input())):
	n = int(input())
	l = []
	a = 10
	while n > 0:
		temp = n % a
		n = n - temp
		l.append(temp)
		a = a * 10
	i = 0
	while i in l:
		l.remove(0)
	print(len(l), '\n' + ' '.join(map(str, l)))


import sys, collections
import io, os
import math
for _ in range(int(input())):
	n = int(input())
	n = str(n)
	l = len(n)
	ans = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		val = n[i] + '0' * (l - (i + 1))
		ans.append(val)
	print(len(ans))
	print(*ans)


t = int(input())
for _ in range(t):
	n1 = int(input())
	l = []
	while n1 > 0:
		x = n1 % 10
		n1 = n1 // 10
		l.append(x)
	start = 1
	for i in range(len(l)):
		l[i] = l[i] * start
		start = start * 10
	l1 = []
	for i in l:
		if i != 0:
			l1.append(i)
	print(len(l1))
	print(*l1)


n = int(input())
for i in range(0, n):
	o = input().rstrip()
	O = int(o)
	L = []
	x = list(o)
	T = len(x) - 1
	for j in range(0, len(x)):
		if x[j] != '0':
			A = int(x[j]) * 10 ** T
			L.append(A)
		T -= 1
	print(len(L))
	print(*L)


a = int(input())
for i in range(a):
	x = int(input())
	string = []
	mul = 1
	while x:
		if int(x % 10 * mul) != 0:
			string.append(str(x % 10 * mul))
		x = x // 10
		mul = mul * 10
	print(len(string))
	print(' '.join(string))


def readInt():
	return int(input())

def readList():
	return list(map(int, input().rstrip().split()))

def readString():
	s = input()
	return s

def readInts():
	return map(int, input().rstrip().split())

def solve(n):
	res = []
	ten = 0
	while n > 0:
		if n % 10 != 0:
			res.append(n % 10 * 10 ** ten)
		ten += 1
		n = n // 10
	print(len(res))
	print(' '.join([str(x) for x in res]))
t = readInt()
for i in range(t):
	n = readInt()
	solve(n)


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


from sys import stdin

def solve(n):
	k = 1
	h = []
	while n > 0:
		if n % 10 != 0:
			h.append(k * (n % 10))
		n //= 10
		k = 10 * k
	print(len(h))
	for i in h:
		print(i, end=' ')
	print()
	return

def main():
	inp = stdin.readline
	for _ in range(int(inp())):
		n = int(inp())
		solve(n)
main()


a = int(input())
for i in range(0, a):
	s = 0
	n = int(input())
	hhh = ''
	realcount = 0
	count = 1
	while n > 0:
		s = n % 10
		n //= 10
		if s != 0:
			realcount += 1
			b = s * count
			hhh += ' ' + str(b)
		count = count * 10
	print(realcount)
	print(hhh)


T = int(input())
for _ in range(T):
	N = int(input())
	C = []
	t = 0
	for i in range(len(str(N)) - 1, -1, -1):
		if N // 10 ** i != 0:
			C.append(str(N // 10 ** i * 10 ** i))
			N = N - N // 10 ** i * 10 ** i
			t += 1
	print(t)
	print(' '.join(C))


import math
from sys import stdin, stdout
from heapq import heapify, heappop, heappush
from collections import Counter
T = int(stdin.readline())
for i in range(T):
	N = int(stdin.readline())
	if 1 <= N <= 9:
		print(1)
		print(N)
		continue
	s = str(N)
	n = len(s)
	res = []
	cnt = 0
	for (p, d) in enumerate(s):
		if int(d) != 0:
			res.append(s[p] + '0' * (n - p - 1))
			cnt += 1
	print(cnt)
	for j in res:
		print(j, end=' ')
	print()


T = int(input())
while T:
	T -= 1
	n = input()
	ans = []
	for (i, v) in enumerate(n):
		if v != '0':
			ans.append(v + '0' * (len(n) - i - 1))
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


import math
for _ in range(int(input())):
	n = int(input())
	n1 = n
	c = 0
	p = 0
	while n != 0:
		if n % 10 != 0:
			c += 1
		n = n // 10
	print(c)
	n = n1
	while n != 0:
		n1 = n
		p = 0
		while n != 0:
			p += 1
			n = n // 10
		n = n1
		v = math.pow(10, p - 1)
		if n // v != 0:
			b = n // v * v
			print(int(b), end=' ')
			n = n - b
	print()


t = int(input())
for i in range(t):
	num = int(input())
	result = []
	for (index, digit) in enumerate(str(num)[::-1]):
		if int(digit) != 0:
			result.append(digit + '0' * index)
	print(len(result))
	print('  '.join(result[::-1]))


def Split_Number(number: int):
	Result = []
	count = 0
	while number > 0:
		t = number % 10
		r = t * 10 ** count
		if r > 0:
			Result.append(r)
		count += 1
		number = int(number / 10)
	return Result
t = int(input())
List = list(list())
for i in range(t):
	n = int(input())
	temp = Split_Number(n)
	List.append(temp)
for l in List:
	length = len(l)
	print(length)
	for i in range(length):
		print(int(l[i]), end=' ')
	print()


n = int(input())
for i in range(n):
	k = 0
	num = int(input())
	dezm = num // 10000
	if dezm != 0:
		k += 1
	unim = num // 1000 - dezm * 10
	if unim != 0:
		k += 1
	cen = num // 100 - dezm * 100 - unim * 10
	if cen != 0:
		k += 1
	dez = num // 10 - dezm * 1000 - unim * 100 - cen * 10
	if dez != 0:
		k += 1
	uni = num - dezm * 10000 - unim * 1000 - cen * 100 - dez * 10
	if uni != 0:
		k += 1
	print(k)
	lista = [dezm * 10000, unim * 1000, cen * 100, dez * 10, uni]
	for zas in lista:
		if zas != 0:
			print(zas, end=' ')


n = int(input())
lista = []
for i in range(n):
	lista.append(int(input()))

def descompo_b10(number):
	lis = []
	cont = 0
	while number != 0:
		valor = number % 10 * 10 ** cont
		number = number // 10
		if valor != 0:
			lis.append(valor)
		cont += 1
	return lis
for num in lista:
	suma = descompo_b10(num)
	print(len(suma))
	print(' '.join(map(str, suma)))


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return map(int, input().split())

def array():
	return [int(i) for i in input().split()]
for _ in range(int(input())):
	n = input()
	d = len(n)
	num = 10 ** d
	n = int(n)
	ans = []
	while n != 0:
		k = n // num * num
		if k != 0:
			ans.append(k)
		n -= k
		num = num // 10
	print(len(ans))
	print(*ans)


n = int(input())
inp = []
ret = []

def int_len(ch):
	return len(str(ch))
for i in range(n):
	new = int(input())
	inp.append(new)
	new_arr = list(map(int, str(new)))
	while len(new_arr) > 0:
		a = new_arr[0]
		if a == 0:
			del new_arr[0]
		else:
			if len(ret) < i + 1:
				ret.append([])
			ret[i].append(str(a * 10 ** (len(new_arr) - 1)))
			del new_arr[0]
for i in range(len(ret)):
	print(len(ret[i]))
	print(' '.join(ret[i]))


T = int(input())
for tt in range(T):
	x = input()
	chisles = []
	i = 1
	num = x[0]
	while i < len(x):
		if x[i] == '0':
			num += x[i]
		else:
			chisles.append(num + '0' * (len(x) - i))
			num = x[i]
		i += 1
	chisles.append(num)
	print(len(chisles))
	print(' '.join(chisles))


from sys import stdin
import math
inp = lambda : stdin.readline().strip()
t = int(inp())
for i in range(t):
	n = int(inp())
	ns = str(n)
	length = len(ns)
	digits = [0] * length
	for i in range(length):
		digits[i] = n // 10 ** (length - i - 1) % 10
	needed = 0
	for i in range(length):
		if digits[i] != 0:
			needed += 1
	print(needed)
	for i in range(length):
		if digits[i] != 0:
			print(10 ** (length - 1 - i) * digits[i], end=' ')
	print('')


tests = int(input())
for i in range(tests):
	d = []
	n = input()
	leng = len(n)
	n = n[::-1]
	i = 0
	while i < leng:
		while n[i] == '0':
			i += 1
		d.append(n[i] + '0' * i)
		i += 1
	print(len(d))
	print(*d)


for _ in range(int(input())):
	n = input()
	i = 0
	k = 0
	l = len(n)
	ll = n.count('0')
	l = l - ll
	while i < len(n):
		if i != 0 and n[i] != '0':
			k = 1
			break
		i = i + 1
	if k == 0:
		print(l)
		print(n)
	else:
		print(l)
		i = -1
		j = 0
		while i >= -len(n):
			if n[i] != '0':
				print(int(n[i]) * 10 ** j, '', end='')
			i = i - 1
			j = j + 1
		print()


t = input()
t = int(t)
for s in range(t):
	num = input()
	num = int(num)
	out = []
	c = 0
	if num > 10000:
		out.append(num - num % 10000)
		num = num % 10000
		c += 1
	if num > 1000:
		out.append(num - num % 1000)
		c += 1
		num = num % 1000
	if num > 100:
		out.append(num - num % 100)
		num = num % 100
		c += 1
	if num > 10:
		out.append(num - num % 10)
		num = num % 10
		c += 1
	if num > 0:
		out.append(num)
		c += 1
	print(c)
	print(' '.join(map(str, out)))


n = int(input())
for i in range(0, n):
	p = int(input())
	c = 0
	l = []
	while p > 0:
		if p % 10 != 0:
			a = p % 10
			ans = 10 ** c * a
			l.append(ans)
		p = p // 10
		c = c + 1
	print(len(l))
	for j in l:
		print(j, end=' ')
	print()


t = int(input())
for i in range(t):
	multiplier = 10
	n = int(input())
	addends = []
	while multiplier < n:
		if n % multiplier != 0:
			addends.append(n % multiplier)
			n = n // multiplier * multiplier
		multiplier *= 10
	addends.append(n)
	print(len(addends))
	for i in addends:
		print(i, end=' ')


t = int(input())
for i in range(t):
	n = int(input())
	k = 0
	out = []
	c = 0
	while n:
		if n % 10:
			k += 1
			out.append(n % 10 * 10 ** c)
		n = int(n / 10)
		c += 1
	print(k)
	for j in range(k):
		print(out[k - j - 1], end=' ')
	print()


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


numbers = [int(input()) for n in range(int(input()))]
for k in numbers:
	(aux, r) = (10, [])
	n = k
	while n // aux != 0:
		if n % aux != 0:
			r.append(str(n % aux))
			n -= n % aux
		aux *= 10
	r.append(str(n))
	print(len(r))
	print(' '.join(r))


t = int(input())
for i in range(t):
	n = int(input())
	l = []
	a = []
	k = n
	y = 0
	while n != 0:
		l.append(n % 10)
		a.append(y)
		n //= 10
		y += 1
	r = len(l)
	if l[len(l) - 1] != 0 and l.count(0) == len(a) - 1:
		print(1)
		print(k)
	else:
		print(r - l.count(0))
		for i in range(r):
			if l[i] != 0:
				print(l[i] * 10 ** a[i], end=' ')
		print()


for _ in range(int(input())):
	n = int(input())
	b = []
	k = 0
	while n > 0:
		if n % 10 != 0:
			b.append(n % 10 * 10 ** k)
		k += 1
		n //= 10
	print(len(b))
	print(*b, sep=' ')


def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def binaryToDecimal(binary):
	binary1 = binary
	(decimal, i, n) = (0, 0, 0)
	while binary != 0:
		dec = binary % 10
		decimal = decimal + dec * pow(2, i)
		binary = binary // 10
		i += 1
	return decimal

def padded_bin_with_complement(x):
	if x < 0:
		return bin(2 ** 64 - abs(x))[2:].zfill(64)
	else:
		return bin(x)[2:].zfill(64)

def countDigit(n):
	count = 0
	while n != 0:
		n //= 10
		count += 1
	return count
for _ in range(ii()):
	n = ii()
	j = countDigit(n)
	n = str(n)
	n1 = list(n)
	a = []
	for i in range(len(n1)):
		if n1[i] != '0':
			a.append(int(n1[i]) * 10 ** (j - 1))
		j -= 1
	print(len(a))
	print(*a)


N = int(input())
for i in range(N):
	num = input()
	lst = [num[i] + (len(num) - i - 1) * '0' for i in range(len(num)) if num[i] != '0']
	print(len(lst))
	print(' '.join(lst))


def getPrint(num):
	count = 0
	num = str(num)
	outStr = []
	zeroes = []
	sizeNum = len(num)
	j = 0
	for i in num:
		if i != '0':
			outStr.append(int(i))
			count += 1
			zeroes.append(sizeNum - 1 - j)
		j += 1
	print(count)
	for k in range(len(outStr)):
		print(str(outStr[k]) + ''.join(['0'] * zeroes[k]), end=' ')
	print()
n = int(input())
a = [0] * n
for i in range(n):
	a[i] = int(input())
for j in range(n):
	getPrint(a[j])


cases = int(input())
for p in range(cases):
	a = input()
	b = []
	for i in range(len(a)):
		b.append(int(a[i]) * 10 ** (len(a) - i - 1))
	le = 0
	ans = ''
	for v in b:
		if v == 0:
			continue
		else:
			le += 1
			ans += str(v) + ' '
	print(le)
	print(ans)


for k in range(int(input())):
	a = input()[::-1]
	f = []
	for j in range(len(a)):
		if a[j] != '0':
			f.append(int(a[j] + '0' * j))
	print(len(f))
	print(*f)


def main():
	T = int(input())
	for _ in range(T):
		N = int(input())
		strN = list(str(N))
		if N // 10 == 0 or (N // 10 != 0 and strN[1:] == ['0' * (len(strN) - 1)]):
			print(1)
			print(N)
		else:
			ans = []
			while strN != []:
				if strN[0] != '0':
					ans.append(int(strN[0]) * pow(10, len(strN) - 1))
				del strN[0]
			print(len(ans))
			print(*ans)
main()


def outPutSol(num):
	numStr = str(num)
	result = ''
	minSum = 0
	length = len(numStr)
	for i in range(length):
		if numStr[i] != '0':
			minSum += 1
			if i != 0:
				result += ' '
			result += numStr[i] + '0' * (length - 1 - i)
	print(minSum)
	print(result)

def main():
	tCase = int(input())
	nums = list()
	for _ in range(tCase):
		nums.append(int(input()))
	for num in nums:
		outPutSol(num)
main()


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	s = list(input().rstrip())
	s.reverse()
	ans = []
	for (i, item) in enumerate(s):
		if item == '0':
			continue
		ans.append((item, i))
	print(len(ans))
	print(*[val + '0' * num for (val, num) in ans])


t = int(input())
while t:
	t -= 1
	n = input()
	k = len(n) - 1
	c = len(n) - n.count('0')
	print(c)
	for i in n:
		if i != str(0):
			print(int(i) * 10 ** k, end=' ')
		k -= 1
	print()


nTest = int(input())
while nTest > 0:
	nTest = nTest - 1
	n = int(input())
	ans = []
	curPow = int(1)
	while n > 0:
		temp = curPow * (n % int(10))
		if temp > 0:
			ans.append(temp)
		n = n // 10
		curPow = curPow * 10
	ans.reverse()
	print(len(ans))
	print(*ans)


tests = int(input())
for i in range(tests):
	z = []
	n = int(input())
	i = 10
	while n != 0:
		num = n % i
		if num != 0:
			z.append(num)
		n -= num
		i *= 10
	print(len(z))
	for i in z:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	c = 0
	l = []
	while n > 0:
		d = n % 10
		if d != 0:
			l.append(d * pow(10, c))
		c += 1
		n //= 10
	print(len(l))
	for i in range(len(l) - 1, -1, -1):
		print(l[i], end=' ')
	print()


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


t = int(input())
for i in range(t):
	a = int(input())
	b = str(a)
	if len(b) == 1:
		print(1)
		print(a)
	elif list(set(b[1:len(b)]))[0] == '0' and len(set(b[1:len(b)])) == 1:
		print(1)
		print(a)
	else:
		li = []
		for i in range(len(b)):
			if b[i] != '0':
				mul = 10 ** (len(b) - i - 1)
				li.append(int(b[i]) * mul)
		print(len(li))
		for i in li:
			print(i, end=' ')


import sys, math

def ii():
	return int(input())

def mii():
	return map(int, input().split())

def lmii():
	return list(mii())

def main():
	for _ in range(ii()):
		s = input()
		n = len(s)
		d = []
		for i in range(n):
			sk = ''
			sk += s[i]
			sk += '0' * (n - 1 - i)
			d.append(sk)
		ans = 0
		for i in range(len(d)):
			if d[i][0] != '0':
				ans += 1
		print(ans)
		for i in range(len(d)):
			if d[i][0] != '0':
				print(d[i], end=' ')
		print(sep='')
main()


t = int(input())
while t:
	n = int(input())
	count = 0
	lst = []
	a = len(str(n))
	while a:
		b = n // 10 ** (a - 1)
		if b != 0:
			lst.append(b * 10 ** (a - 1))
			n = n - lst[-1]
			count += 1
		a -= 1
	print(count)
	print(*lst)
	t -= 1


t = int(input())
for _ in range(t):
	n = input()
	res = []
	l = len(n)
	for (index, i) in enumerate(n):
		if i != '0':
			res.append(int(i) * 10 ** (l - index - 1))
	print(len(res))
	print(*res)


T = int(input())
for _ in range(T):
	value = input()
	if int(value) <= 9:
		print(1)
		print(value)
		continue
	ans = []
	temp = value[0]
	for i in range(1, len(value)):
		temp += '0'
	ans.append(int(temp))
	for i in range(1, len(value)):
		if value[i] == '0':
			continue
		else:
			temp = value[i]
			for j in range(i + 1, len(value)):
				temp += '0'
			ans.append(int(temp))
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


def DCount(num):
	c = 0
	while num > 0:
		c = c + 1
		num = num // 10
	return c
t = int(input())
for i in range(0, t):
	n = int(input())
	c = DCount(n)
	l = list()
	o = 0
	for i in range(0, c - 1):
		t = n % 10
		if t == 0:
			n = n // 10
		else:
			l.append(t * 10 ** i)
			n = n // 10
			o = o + 1
	l.append(n * 10 ** (c - 1))
	print(o + 1)
	d = len(l)
	for u in range(d):
		print(l[u], end=' ')


for _ in range(int(input())):
	n = int(input())
	li = []
	i = 0
	while n > 0:
		p = n % 10
		q = p * 10 ** i
		li.append(q)
		n //= 10
		i += 1
	cnt = 0
	for i in li:
		if i == 0:
			continue
		cnt += 1
	print(cnt)
	for i in li:
		if i == 0:
			continue
		print(i, end=' ')


import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *

class Scanner:

	@staticmethod
	def int():
		return int(sys.stdin.readline().rstrip())

	@staticmethod
	def string():
		return sys.stdin.readline().rstrip()

	@staticmethod
	def map_int():
		return [int(x) for x in Scanner.string().split()]

	@staticmethod
	def string_list(n):
		return [Scanner.string() for i in range(n)]

	@staticmethod
	def int_list_list(n):
		return [Scanner.map_int() for i in range(n)]

	@staticmethod
	def int_cols_list(n):
		return [Scanner.int() for i in range(n)]

class Math:

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		return Math.gcd(b, a % b)

	@staticmethod
	def lcm(a, b):
		return a * b // Math.gcd(a, b)

	@staticmethod
	def divisor(n):
		res = []
		i = 1
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				res.append(i)
				if i != n // i:
					res.append(n // i)
		return res

	@staticmethod
	def round_up(a, b):
		return -(-a // b)

	@staticmethod
	def is_prime(n):
		if n < 2:
			return False
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		d = int(n ** 0.5) + 1
		for i in range(3, d + 1, 2):
			if n % i == 0:
				return False
		return True

def pop_count(x):
	x = x - (x >> 1 & 6148914691236517205)
	x = (x & 3689348814741910323) + (x >> 2 & 3689348814741910323)
	x = x + (x >> 4) & 1085102592571150095
	x = x + (x >> 8)
	x = x + (x >> 16)
	x = x + (x >> 32)
	return x & 127
MOD = int(1000000000.0) + 7
INF = int(1000000000000000.0)

def solve():
	S = Scanner.string()
	N = len(S)
	ans = []
	for i in reversed(range(N)):
		if S[i] == '0':
			continue
		else:
			ans.append(S[i] + '0' * (N - 1 - i))
	print(len(ans))
	print(*ans, sep=' ')

def main():
	T = Scanner.int()
	for _ in range(T):
		solve()
main()


for i in range(int(input())):
	n = int(input())
	if '1' <= str(n)[0] <= '9' and set(str(n)) == '0':
		print(1)
		print(n)
	else:
		lst = list(str(n))[::-1]
		for i in range(len(lst)):
			lst[i] = int(lst[i])
			lst[i] *= 10 ** i
		if sum(lst) == n:
			k = 0
			for i in lst:
				if i != 0:
					k += 1
			print(k)
			k = 0
			for i in lst:
				if i != 0:
					print(i, end=' ')


t = int(input())
for i in range(t):
	p = 0
	s = ''
	a = int(input())
	while a > 0:
		t = 10
		while a % t == 0:
			t = t * 10
		s = s + str(a % t) + ' '
		a = a - a % t
		p = p + 1
	print(p)
	print(s)


inp = int(input())
l = []
e = ''
for x in range(inp):
	inp1 = input()
	for x in range(1, len(inp1) + 1):
		if inp1[x - 1] != '0':
			l.append(int(inp1[x - 1]) * 10 ** (len(inp1) - x))
	print(len(l))
	for no in l:
		e = e + str(no) + ' '
	print(e)
	l = []
	e = ''


t = int(input())
for _ in range(t):
	n = int(input())
	list1 = [int(str(n)[i - 1]) * 10 ** (len(str(n)) - i) for i in range(1, len(str(n)) + 1)]
	print(len(list(filter(lambda x: x != 0, list1))))
	print(' '.join((str(j) for j in list(filter(lambda x: x != 0, list1)))))


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


T = int(input())
for t in range(T):
	N = input()
	rounds = []
	for (i, c) in enumerate(N):
		if c != '0':
			rounds.append(int(c) * 10 ** (len(N) - i - 1))
	print(len(rounds))
	print(' '.join((str(s) for s in rounds)))


a = int(input())
for _ in range(a):
	n = int(input())
	count = 0
	i = 1
	L = []
	while i <= 5:
		c = n % 10 ** i
		b = n // 10 ** i
		if c != 0 and c not in L:
			L.append(c)
			count += 1
		i += 1
	print(count)
	X = [L[0]]
	for i in range(1, len(L)):
		X.append(L[i] - L[i - 1])
	print(*X, sep=' ')


t = int(input())
for i in range(t):
	n = int(input())
	res = []
	keta = 1
	while n > 0:
		if n % 10 == 0:
			n //= 10
			keta *= 10
			continue
		res.append(n % 10 * keta)
		n //= 10
		keta *= 10
	print(len(res))
	print(*res)


from sys import stdin, stdout
from math import gcd, ceil, sqrt
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
tc = ii1()
for _ in range(tc):
	n = is1()
	res = []
	for i in range(len(n)):
		temp = n[i] + '0' * (len(n) - i - 1)
		if int(temp) > 0:
			res.append(temp)
	print(len(res))
	print(*res)


b = []
nzero = 0
for i in range(int(input())):
	a = int(input())
	for k in range(len(str(a))):
		if a % 10 != 0:
			nzero += 1
			b.append(a % 10 * 10 ** k)
		a = a // 10
	print(nzero)
	for h in range(len(b)):
		print(b[-h - 1], end=' ')
	print()
	b = []
	nzero = 0


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


n = int(input())
for i in range(n):
	s = input()
	s1 = []
	for j in range(len(s)):
		if s[j] != '0':
			s1 += [int(s[j]) * 10 ** (len(s) - j - 1)]
	print(len(s1))
	for j in range(len(s1)):
		print(s1[j], end=' ')
	print('\n')


t = int(input())
for i in range(t):
	x = int(input())
	ans = []
	while x > 0:
		tmp = x
		cnt = 0
		while tmp > 10:
			tmp = tmp // 10
			cnt += 1
		ans.append(tmp * 10 ** cnt)
		x -= tmp * 10 ** cnt
	if x != 0:
		ans.append(x)
	print(len(ans))
	for j in ans:
		print(j, end=' ')
	print()


def solve():
	a = input()
	l = len(a) - 1
	ans = 0
	L = []
	for c in a:
		if c != '0':
			ans += 1
			L.append(c + '0' * l)
		l -= 1
	print(ans)
	for c in L:
		print(c, end=' ')
	print('')
for _ in range(int(input())):
	solve()


t = int(input())
for _ in range(t):
	c = 1
	list = []
	sum = 0
	x = int(input())
	while x > 0:
		if x % 10 != 0:
			r = x % 10 * c
			list.append(r)
			sum = sum + 1
		x = x // 10
		c = c * 10
	print(sum)
	for _ in range(sum):
		print(list[_], end=' ')


t = int(input())
for i in range(0, t):
	n = int(input())
	lst = list(map(int, str(n)))
	if n % lst[0] == 0 and n % 10 ** (len(lst) - 1) == 0:
		print(1)
		print(n)
	else:
		count = 0
		str1 = ''
		for i in range(len(lst)):
			if lst[i] != 0:
				str1 = str1 + str(lst[i] * 10 ** (len(lst) - i - 1)) + ' '
				count += 1
		print(count)
		print(str1)


t = int(input())
for w in range(t):
	n = input()
	l = list(n)
	j = len(l)
	s = []
	for i in range(len(l)):
		j = j - 1
		if j == 0:
			x = pow(10, len(l) - 1)
			y = int(l[j])
			z = x * y
			s.append(z)
			break
		if l[j] != '0':
			d1 = pow(10, len(l) - 1)
			d2 = pow(10, j)
			d = int(d1 / d2)
			m = int(l[j])
			t = m * d
			s.append(t)
	print(len(s))
	a = ''
	for k in range(len(s)):
		a = a + str(s[k]) + ' '
	print(a)


from sys import stdin, exit
input = stdin.readline

def i():
	return input()

def ii():
	return int(input())

def iis():
	return map(int, input().split())

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

def print_array(a):
	print(' '.join(map(str, a)))
t = ii()
for _ in range(t):
	i = input().strip()
	ans = []
	missing = len(i) - 1
	for c in range(len(i)):
		if i[c] != '0':
			a = '0' * missing
			b = str(i[c])
			aa = b + a
			ans.append(aa)
		missing -= 1
	print(len(ans))
	print_array(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	ss = []
	s = str(n)
	i = 5
	for i in range(len(s)):
		ss.append(int(s[i]) * 10 ** (len(s) - i - 1))
	ak = [i for i in ss if i != 0]
	print(len(ak))
	print(*ak)


from __future__ import division, print_function
import sys
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
if os.path.exists('out.txt'):
	sys.stdout = open('out.txt', 'w')

def input():
	return sys.stdin.readline()

def mapi(arg=0):
	return map(int if arg == 0 else str, input().split())
for _ in range(int(input())):
	n = int(input())
	res = []
	i = 1
	while n:
		if n % 10 == 0:
			n //= 10
			i *= 10
			continue
		res.append(n % 10 * i)
		n //= 10
		i *= 10
	print(len(res))
	print(*res)


n = int(input())
for _ in range(n):
	number = input()
	place_values = []
	for i in range(len(number)):
		if number[i] != '0':
			place_values.append(number[i] + '0' * (len(number) - 1 - i))
	print(len(place_values))
	print(*place_values)


t = int(input())
for _ in range(t):
	n = input()
	k = len(n.replace('0', ''))
	print(k)
	ln = len(n)
	lst = [n[i] + '0' * (ln - i - 1) for i in range(ln) if n[i] != '0']
	print(*lst)


num1 = int(input())
d = 0
c = 0
for i in range(num1):
	s = input()
	f = len(s) - 1
	d = 0
	list1 = []
	c = 0
	for h in range(len(s)):
		if s[h] == '0':
			f -= 1
			continue
		else:
			c += 1
			d = int(s[h]) * pow(10, f)
			f -= 1
			list1.append(d)
	print(c)
	for i in list1:
		print(i, end=' ')
	print()


def main():
	nums = []
	for i in range(int(input())):
		nums.append(input())
	for i in range(len(nums)):
		counter = 0
		for j in range(len(nums[i])):
			if nums[i][j] != '0':
				counter += 1
		print(counter)
		for j in range(len(nums[i])):
			if nums[i][j] != '0':
				print(nums[i][j] + '0' * (len(nums[i]) - j - 1), end=' ')
		print()
main()


t = int(input())
s = ''
for i in range(t):
	n = input()
	x = 0
	for j in range(len(n)):
		if n[j] != '0':
			s = s + n[j] + '0' * (len(n) - j - 1) + ' '
			x += 1
	print(x)
	print(s)
	s = ''


def co(s):
	t = str(s)
	x = list(t)
	l = len(x) - 1
	s = ''
	c = 0
	for (k, v) in enumerate(x):
		t = str(v) + '0' * (l - k)
		if t[0] != '0':
			s += t + ' '
			c += 1
	print(c)
	v = list(map(int, s.split()))
	[print(i, end=' ') for i in v]
	print()
l = list()
for i in range(int(input())):
	l.append(int(input()))
for i in l:
	co(i)


t = int(input())
for _ in range(t):
	n = int(input())
	res = []
	z = ''
	s = str(n)
	for i in range(len(s)):
		z += '0'
	for i in range(len(s)):
		num = s[i]
		if num != '0':
			res.append(int(num + z[i + 1:]))
	print(len(res))
	print(*res)


t = int(input())
for _ in range(t):
	n = input()
	lst = []
	for i in range(len(n)):
		c = n[i]
		if c != '0':
			lst.append(c + '0' * (len(n) - i - 1))
	print(len(lst))
	print(' '.join(lst))


import sys
inputs = sys.stdin.read().split()
for a in range(1, len(inputs[1:]) + 1):
	num_lst = list(str(inputs[a]))
	res = []
	for i in range(len(num_lst)):
		places = 10 ** (len(num_lst) - 1 - i)
		num_lst[i] = str(int(num_lst[i]) * places)
		if int(num_lst[i]) > 0:
			res.append(num_lst[i])
	print(len(res))
	print(' '.join(res))


def solve(x):
	if x < 10:
		return (1, [x])
	r = 1
	digits = []
	while x > 0:
		(x, rem) = divmod(x, 10)
		if rem > 0:
			digits.append(rem * r)
		r *= 10
	return (len(digits), digits)
t = int(input())
for _ in range(t):
	number = int(input())
	(k, rounds) = solve(number)
	print(k)
	print(' '.join(map(str, rounds)))


t = int(input())
ans = []
for kek in range(t):
	n = input()
	ans.append([])
	j = len(n) - 1
	for i in n:
		if i == '0':
			j -= 1
			continue
		ans[-1].append(i + '0' * j)
		j -= 1
	print(len(ans[-1]))
	print(*ans[-1])


t = int(input())
for _ in range(t):
	n = int(input())
	l = []
	i = 1
	while n > 0:
		mod = pow(10, i)
		temp = n % mod
		if temp == 0:
			i += 1
			continue
		else:
			i += 1
			n = n - temp
			l.append(temp)
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


def s():
	n = int(input())
	if n <= 9:
		print(1)
		print(n)
	else:
		d = ''
		n = str(n)
		p = len(n)
		ans = []
		for i in range(p - 1, -1, -1):
			if n[i] != '0':
				ans.append(int(n[i] + (p - 1 - i) * '0'))
		print(len(ans))
		for x in ans:
			print(x, end=' ')
		print()
t = int(input())
for i in range(t):
	s()


t = int(input())
for i in range(0, t):
	x = str(input())
	a = []
	for i in range(0, len(x)):
		if x[i] != '0':
			str1 = x[i]
			y = '0' * (len(x) - 1 - i)
			str1 += y
			a.append(str1)
	print(len(a))
	for i in a:
		print(i, end=' ')


a = int(input())
n = []
for i in range(0, a):
	n.append(int(input()))
for i in range(0, a):
	r = list(str(n[i]))
	s = []
	k = len(r) - 1
	for char in r:
		if char is not '0':
			s.append(int(char) * 10 ** k)
			k -= 1
		else:
			k -= 1
	print(len(s))
	for j in s:
		print(j)


from collections import defaultdict
import sys
input = sys.stdin.readline
inf = 100000000000000000
mod = 998244353
for CASES in range(int(input())):
	ANS = []
	n = int(input())
	p = 5
	while n:
		pos = 10 ** p
		if n // pos != 0:
			ANS.append(n // pos * pos)
			n %= pos
		p -= 1
	print(len(ANS))
	print(*ANS)


import sys
t = int(input())
while t > 0:
	n = int(input())
	cur = 1
	res = []
	while n > 0:
		x = n % 10
		if x != 0:
			res.append(cur * x)
		n //= 10
		cur *= 10
	print(len(res))
	for x in res:
		print(x, end=' ')
	print()
	t -= 1


T = int(input())
while T > 0:
	N = int(input())
	ans = []
	tens = 1
	while N > 0:
		r = N % 10
		if r != 0:
			ans.append(f'{tens * r}')
		N //= 10
		tens *= 10
	print(len(ans))
	print(' '.join(ans))
	T -= 1


from sys import stdin
from sys import stdout
sprint = stdout.write
sinput = stdin.readline

def func():
	num = sinput()
	ans = []
	a = 0
	for i in range(len(num) - 1):
		if num[i] != '0':
			ans.append(num[i] + '0' * (len(num) - 2 - i))
			a += 1
	print(a)
	ans = str(ans).replace('[', '').replace(']', '').replace("'", '').replace(',', '')
	print(ans)
t = int(sinput())
while t != 0:
	if t == 1000 - 84 + 1 + t:
		int(sinput())
		sprint()
		t -= 1
	else:
		t -= 1
		func()


def solve(a):
	b = len(str(a))
	d = a
	e = a
	c = ''
	count = 0
	while d > 0:
		count += 1
		d = int(d / 10 ** (b - 1)) * 10 ** (b - 1)
		c += str(d) + ' '
		e = e % 10 ** (b - 1)
		d = e
		b = len(str(d))
	print(count)
	print(c)
t = int(input())
for _ in range(t):
	a = int(input())
	solve(a)


t = int(input())
for i in range(t):
	a = int(input())
	x = a
	array = []
	count = 0
	step = 0
	while x > 0:
		if x % 10 != 0:
			count += 1
			array.append(x % 10 * 10 ** step)
		x //= 10
		step += 1
	print(count)
	print(' '.join(map(str, array)))


t = int(input())
for _ in range(t):
	n = int(input())
	if n < 10:
		print(1)
		print(n)
	else:
		l = []
		while n > 0:
			r = n % 10
			l.append(r)
			n = n // 10
		print(len(l) - l.count(0))
		for i in range(len(l)):
			if l[i] != 0:
				print(l[i] * pow(10, i), end=' ')
		print(end='\n')


t = int(input())
for _ in range(t):
	s = input()
	l = 0
	for i in range(len(s)):
		if s[i] != '0':
			l += 1
	print(l)
	for i in range(len(s)):
		x = s[i]
		if x == '0':
			continue
		for j in range(len(s) - i - 1):
			x += '0'
		print(x, end=' ')
	print()


testCases = int(input())
while testCases > 0:
	number = input()
	numberInInt = int(number)
	start = 10
	maximum = 10 ** len(number)
	listAnswers = []
	while start <= maximum:
		rest = numberInInt % start
		if rest != 0:
			listAnswers.append(rest)
		numberInInt -= rest
		start = start * 10
	if numberInInt != 0:
		listAnswers.append(numberInInt)
	print(len(listAnswers))
	print(*listAnswers)
	testCases -= 1


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


import math
t = int(input())
for _ in range(t):
	n = input()
	a = []
	length = len(n)
	cnt = 0
	for i in range(length):
		tmp = int(n[i]) * pow(10, length - i - 1)
		a.append(tmp)
		if tmp != 0:
			cnt += 1
	print(cnt)
	print(' '.join((str(x) for x in a if str(x) != '0')))


def splitt(n):
	ar = []
	if n > 0:
		while n > 0:
			k = n % 10
			ar.append(k)
			n = n // 10
	else:
		ar.append(0)
	ar.reverse()
	return ar
n = int(input())
for i in range(0, n):
	x = int(input())
	ar = splitt(x)
	b = []
	f = len(ar)
	for i in range(0, len(ar)):
		if ar[i] > 0:
			d = ar[i] * pow(10, f - i - 1)
			b.append(d)
	print(len(b))
	print(*b)


for i in range(int(input())):
	n = input()
	lista = []
	l = len(n)
	kn = 0
	for j in range(l):
		if n[j] != '0':
			aux = n[j]
			for k in range(l - j - 1):
				aux = aux + '0'
			kn += 1
			lista.append(int(aux))
	print(kn)
	print(*lista)


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


t = int(input())
for _ in range(t):
	num = list(input())
	n = len(num)
	ans = []
	for i in range(len(num)):
		n -= 1
		if num[i] == '0':
			continue
		ans.append(int(num[i]) * 10 ** n)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	count = 0
	ans = []
	while n > 0:
		digit = n % 10
		n = n // 10
		if digit == 0:
			count = count + 1
			continue
		ans.append(pow(10, count) * digit)
		count = count + 1
	print(len(ans))
	for x in range(len(ans)):
		print(ans[x])


t = int(input())
while t:
	t -= 1
	s = input()
	n = len(s)
	num = []
	for a in s:
		n -= 1
		if a != '0':
			num.append(a + '0' * n)
	print(len(num))
	for a in num:
		print(a, end=' ')
	print('')


try:
	for _ in range(int(input())):
		num = int(input())
		result = []
		for (index, digit) in enumerate(str(num)[::-1]):
			if int(digit) != 0:
				result.append(digit + '0' * index)
		print(len(result))
		re = ' '.join(result)
		print(re)
except EOFError as e:
	pass


import sys, os
from io import BytesIO, IOBase
import collections, itertools, bisect, heapq, math, string
BUFSIZE = 8192
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	t = int(input())
	for i in range(t):
		n = str(input())
		length = len(n)
		ans = []
		for j in range(len(n)):
			if n[j] != '0':
				ans.append(str(int(n[j]) * 10 ** (length - j - 1)))
		print(len(ans))
		print(' '.join(ans))
main()


n = int(input())
for _ in range(n):
	l = input()
	s = []
	for i in range(len(l)):
		s.append(int(l[i]) * pow(10, len(l) - i - 1))
	print(len(s) - s.count(0))
	for i in range(len(s)):
		if s[i] != 0:
			print(s[i], end=' ')


test_cases = int(input())

def isround(num):
	if int(num) <= 10:
		return 1
	length = len(num)
	if int(num) % pow(10, length - 1) == 0:
		return 1
	else:
		return 0

def splitround(num, count, answer):
	if isround(num) == 1:
		answer = answer + num
		count += 1
		print(count)
		print(answer)
		return
	else:
		l = len(num)
		p = pow(10, l - 1)
		curr = int(int(num) / p) * p
		answer = answer + str(curr) + ' '
		num = int(num) - int(curr)
		num = str(num)
		splitround(num, count + 1, answer)
for i in range(test_cases):
	n = input()
	if isround(n) == 1:
		print(1)
		print(n)
		continue
	else:
		splitround(n, 0, '')


for i in range(int(input())):
	a = []
	x = input()
	b = 0
	for q in x:
		if q != '0':
			a.append(q + '0' * (len(x) - b - 1))
		b += 1
	print(len(a))
	print(*a, sep=' ')


def main():
	n = int(input())
	for i in range(n):
		num = list(input())
		j = len(num) - 1
		resultado = []
		if j == 0:
			print(1)
			print(num[0])
		else:
			m = 0
			while j != -1:
				numero = int(num[m])
				if numero != 0:
					numero = numero * 10 ** j
					resultado.append(numero)
					j -= 1
					m += 1
				else:
					j -= 1
					m += 1
			print(len(resultado))
			print(*resultado)
main()


def solve():
	n = int(input())
	l = list(str(n))
	k = len(l) - 1
	if n % 10 ** k == 0:
		print(1)
		print(n)
	else:
		ans = []
		for i in range(len(l)):
			if l[i] != '0':
				x = int(l[i]) * 10 ** k
				ans.append(x)
			k -= 1
		print(len(ans))
		print(*ans)
try:
	for _ in range(int(input())):
		solve()
except:
	pass


for _ in range(int(input())):
	n = int(input())
	a = []
	x = int(1)
	k = int(1)
	if n > 10:
		while n != 0:
			a.append(int(n % 10) * int(10 ** (k - 1)))
			if n % 10 != 0:
				x += 1
			n = n // 10
			k += 1
	if x == 1:
		print('1')
		print(n)
	else:
		print(x - 1)
		for i in a:
			if i != 0:
				print('{} '.format(i), end='')
		print()


import math
import os
import random
import re
import sys

def printarr(arr):
	for z in arr:
		if type(z) is list:
			for k in z:
				print(k, end=' ')
		else:
			print(z, end=' ')
	print(end='\n')

def solve(n):
	z = 0
	els = []
	while n > 0:
		rem = n % 10 * 10 ** z
		if rem != 0:
			els.append(rem)
		n = int(n / 10)
		z += 1
	print(len(els))
	els.reverse()
	printarr(els)
n = int(input())
for _ in range(n):
	solve(int(input()))


q = int(input())
while q > 0:
	q -= 1
	x = int(input())
	res = 1
	G = []
	while x >= 1:
		if x % 10 != 0:
			G.append(res * (x % 10))
		res = res * 10
		x //= 10
	print(len(G))
	for i in G:
		print(i, end=' ')
	print()


T = int(input())
N = [int(input()) for i in range(T)]

def make_list(x):
	X = x
	L = []
	l = len(str(x))
	for i in range(1, l + 1):
		p = X % 10 ** i
		if p != 0:
			L.append(p)
		X -= p
	return L
for i in range(T):
	ML = make_list(N[i])
	print(len(ML))
	print(*ML)


import sys, heapq
from collections import *
from functools import lru_cache
sys.setrecursionlimit(10 ** 6)

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		res = []
		base = 1
		while n:
			r = n % 10
			if r:
				res.append(r * base)
			n //= 10
			base *= 10
		print(len(res))
		print(' '.join(map(str, res)))
main()


n = int(input())
for j in range(n):
	a = int(input())
	le = len(str(a))
	s = str(a)
	l = []
	c = 0
	for i in range(0, le):
		if s[i] != '0':
			c += 1
			l.append(int(s[i]) * 10 ** (le - i - 1))
	print(c)
	print(*l)


def main():
	casos = int(input())
	for i in range(casos):
		numero = str(input())
		tamano = len(numero)
		c = 0
		lista = []
		while tamano > 0:
			if numero[c] != '0':
				lista.append(numero[c] + '0' * (tamano - 1))
			c += 1
			tamano -= 1
		print(len(lista))
		print(*lista)
main()


t = int(input())
for _ in range(t):
	m = input()
	aux = len(m) - 1
	resposta = []
	for i in m:
		if i != '0':
			resposta.append(int(i) * 10 ** aux)
		aux -= 1
	print(len(resposta))
	print(*resposta)


t = int(input())
for k in range(t):
	n = int(input())
	x = 10
	count = 0
	a = []
	while n > 0:
		while n % x == 0:
			x = x * 10
		else:
			count = count + 1
			a.append(n % x)
			n = n - n % x
	print(count)
	for i in a:
		print(i, end=' ')
	print()


for _ in range(int(input())):
	z = input()
	n = int(z)
	print(len(z) - z.count('0'))
	for i in range(len(z) + 1):
		if n % 10 ** i != 0:
			print(n % 10 ** i, end=' ')
			n = n - n % 10 ** i


for _ in range(int(input())):
	s = input()
	p = s.count('0')
	if p == len(s) - 1:
		print(1)
		print(s)
	elif len(s) == 1:
		print(1)
		print(s)
	else:
		c = len(s)
		l = []
		i = 0
		while i < len(s):
			if s[i] == '0':
				pass
				c = c - 1
			else:
				l.append(int(s[i]) * 10 ** (c - 1))
				c = c - 1
			i += 1
		print(len(l))
		for i in l:
			print(i, end=' ')
		print()


for _ in range(int(input())):
	num = input()
	n = len(num)
	li = []
	s = ''
	for i in range(n - 1, -1, -1):
		if num[i] != '0':
			li.append(num[i] + s)
		s += '0'
	print(len(li))
	print(*li, sep=' ')


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
for _ in range(int(input())):
	n = list(input())
	f = len(n) - 1
	l = []
	for i in n:
		if i != '0':
			t = pow(10, f)
			l.append(t * int(i))
		f -= 1
	print(len(l))
	print(*l)


def main():
	for test in range(int(input())):
		n = int(input())
		print(*solution(n), sep='\n')

def solution(n):
	ln = len(str(n))
	result = ''
	if n <= 10:
		result += str(n)
	else:
		n = str(n)
		for i in range(ln):
			if n[i] != '0':
				result += n[i] + '0' * (ln - (1 + i)) + ' '
	return (len(result.split()), result)
main()


test = int(input())
for i in range(test):
	n = int(input())
	count = 0
	if n >= 1 and n < 10:
		print(1)
		print(n)
	else:
		final = list()
		leng = len(str(n))
		for i in range(0, leng):
			temp1 = n % 10
			if temp1 != 0:
				k = 10 ** i
				final.append(temp1 * k)
			n = n // 10
		print(len(final))
		print(*final)


t = int(input())
for i in range(t):
	x = int(input())
	ten = ans = 0
	l = []
	while x > 0:
		m = x % 10
		if m != 0:
			ans += 1
			l.append(m * 10 ** ten)
		ten += 1
		x //= 10
	print(ans)
	for n in l:
		print(n, end=' ')


t = int(input())
for i in range(t):
	n = int(input())
	(ans, cnt) = (0, 0)
	res = []
	while n > 0:
		m = n % 10
		n //= 10
		if m > 0:
			ans += 1
			res.append(m * 10 ** cnt)
		cnt += 1
	print(ans)
	for r in res:
		print(r, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	p = 1
	rs = []
	cnt = 0
	while n > 0 and cnt < 10:
		digit = n % 10
		if digit:
			rs.append(digit * p)
		p *= 10
		n = int(n / 10)
		cnt += 1
	print(len(rs))
	for x in rs:
		print(x)


t = int(input())
for i in range(t):
	l = input()
	lst = list(l)
	b = []
	n = 0
	mm = len(lst)
	for j in range(mm):
		if int(lst[j]) != 0:
			n = 10 ** (mm - (j + 1))
			nn = int(lst[j]) * n
			b.append(nn)
	print(len(b))
	for num in b:
		print(num, end=' ')
	lst = []


t = int(input())
for _ in range(t):
	n = input()
	if len(n) == 1 or int(n[1:]) == 0:
		print(1)
		print(n)
	else:
		count = 0
		l = []
		for i in range(len(n)):
			if n[i] == '0':
				pass
			else:
				l.append(n[i] + '0' * len(n[i + 1:]))
				count += 1
		print(count)
		print(' '.join(l))


for _ in range(int(input())):
	l = list(map(int, input()))
	n = len(l)
	k = []
	for t in range(n):
		if l[t] > 0:
			k.append(l[t] * 10 ** (n - t - 1))
	print(len(k))
	print(*k)


n = int(input())
for i in range(n):
	t = int(input())
	lis = []
	j = 1
	while t != 0:
		digit = t % 10
		t = t // 10
		if digit != 0:
			lis.append(int(digit) * j)
		j = j * 10
	print(len(lis))
	print(*lis)


for t in range(int(input())):
	n = int(input())
	(a, c) = ([], 1)
	while n > 0:
		v = n % 10
		n = n // 10
		if v:
			a.append(v * c)
		c = c * 10
	print(len(a))
	print(*a)


t = int(input())
out = ''
while t > 0:
	t -= 1
	n = int(input())
	answer = []
	i = 0
	while n > 0:
		c = n % 10
		x = c * 10 ** i
		if x != 0:
			answer.append(x)
		n //= 10
		i += 1
	out += f'{len(answer)}\n'
	out += ' '.join((str(i) for i in answer)) + '\n'
print(out)


for _ in range(int(input())):
	n = input()
	length = len(n)
	L = []
	d = 0
	for x in n:
		t = int(x)
		if t > 0:
			t = t * 10 ** (length - d - 1)
			L.append(t)
		d += 1
	l = len(L)
	print(l)
	for x in range(l):
		if x == l - 1:
			print(L[x])
		else:
			print(L[x], end=' ')


n = int(input())
for i in range(n):
	l = []
	m = str(input())
	d = len(m) - 1
	for j in range(0, len(m)):
		a = 10 ** d
		if m[j] != '0':
			l.append(int(m[j]) * int(a))
			d = d - 1
		else:
			d = d - 1
	print(len(l))
	print(*l)


def Hello(n):
	k = n
	c = 0
	l = 0
	p = []
	while k != 0:
		if k % 10 != 0:
			c += 1
			p.append(k % 10 * 10 ** l)
		k = k // 10
		l += 1
	print(c)
	print(' '.join(map(str, p)))
t = int(input())
for _ in range(t):
	Hello(int(input()))


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	p = 0
	l = []
	while n > 0:
		m = n % 10
		n = n // 10
		if m > 0:
			if p > 0:
				l.append(m * 10 ** p)
			else:
				l.append(m)
		p += 1
	print(len(l))
	for k in l:
		print(k, end=' ')
	print()


for i in range(int(input())):
	a = list(map(int, input()))
	res = len(list(filter(lambda x: x > 0, a)))
	print(res)
	print(*[a[i] * 10 ** (len(a) - i - 1) if a[i] > 0 else '' for i in range(len(a))])


def main():
	for _ in range(int(input())):
		n = int(input())
		if n >= 1 and n <= 9:
			print(f'1\n{n}')
			continue
		count = 0
		roundNumbers = list()
		length = len(str(n))
		for (index, digit) in enumerate(str(n)):
			if digit != '0':
				roundNumbers.append(int(digit) * 10 ** (length - index - 1))
				count += 1
		print(count)
		print(*roundNumbers)
main()


def isRound(number):
	isRound = True
	while number > 10:
		digit = number % 10
		number //= 10
		if digit != 0:
			isRound = False
			break
	return isRound

def getLast(number):
	return number // 10 ** (len(str(number)) - 1)
c = int(input())
for _ in range(c):
	number = input()
	ans = [(number[0], 0)]
	for i in range(1, len(number)):
		if not number[i] == '0':
			ans.append((number[i], i))
	print(len(ans))
	for i in range(len(ans)):
		print(ans[i][0] + '0' * (len(number) - ans[i][1] - 1), end=' ')
	print('')


n = int(input())
for _ in range(n):
	s = input()
	nc = len(s)
	print(nc - s.count('0'))
	for (i, x) in enumerate(s):
		if x != '0':
			print(x + '0' * (nc - 1 - i), end=' ')


import re
for _ in range(int(input())):
	s = input()
	l = re.findall('[1-9]', s)
	ans = list()
	print(len(l))
	for digit in l:
		index = s.find(digit)
		s = s[:index] + '0' + s[index + 1:]
		ans.append(digit + '0' * (len(s) - 1 - index))
	print(*ans)


for t in range(int(input())):
	n = int(input())
	l = []
	count1 = 0
	if n < 9 and n > 0:
		print(1)
		print(n)
	else:
		temp = n
		x = 1
		while n >= 10:
			r = n % 10
			n = n // 10
			if r == 0:
				x = x * 10
			else:
				l.append(r * x)
				x = x * 10
		l.append(n * x)
		for i in range(len(l) - 1):
			if l[i] == 0:
				count1 += 1
		if count1 == len(l) - 1:
			print(1)
			print(temp)
		else:
			print(len(l))
			for i in l:
				print(i, end=' ')
			print()


n = int(input())
a = []
for i in range(n):
	k = int(input())
	n = 0
	t = 0
	text = ''
	while k >= 1:
		if k % 10 != 0:
			text = text + str(k % 10 * 10 ** t) + ' '
			n += 1
		k = k // 10
		t += 1
	print(n)
	print(text)


I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	x = input()
	temp = []
	for i in range(len(x)):
		if x[i] != '0':
			temp.append(x[i] + '0' * (len(x) - i - 1))
	print(len(temp))
	print(*temp)


n = int(input())
for i in range(n):
	num = input()
	numLen = len(num)
	ans = []
	for j in range(1, numLen):
		if num[j] != '0':
			ans.append(f"{num[j]}{'0' * (numLen - j - 1)}")
	print(f"{len(ans) + 1}\n{' '.join(ans)} {num[0]}{'0' * (numLen - 1)}")


n = int(input())
for i in range(0, n):
	str_ = str(input())
	count_ = 0
	finstr = ''
	for k in range(len(str_) - 1, -1, -1):
		if str_[k] != '0':
			tmpstr = str_[k]
			finstr = tmpstr.ljust(1 + len(str_) - 1 - k, '0') + ' ' + finstr
			count_ = count_ + 1
	print(count_)
	print(finstr)


for T in range(int(input())):
	n = int(input())
	res = []
	c = 1
	while n:
		if n % 10:
			res.append(n % 10 * c)
		c *= 10
		n //= 10
	print(len(res))
	for x in res:
		print(x, end=' ')
	print()


t = int(input())
for i in range(t):
	s = input()
	n = int(s)
	ans = ''
	summands = 0
	cnt = len(s) - 1
	for ch in s:
		if ch != '0':
			ans = ans + ch + '0' * cnt + ' '
			summands += 1
		cnt -= 1
	print(summands)
	print(ans)


mod = int(1000000000.0) + 7

def ip():
	return int(input())

def Ip():
	return map(int, input().split())
from math import pow
for _ in range(0, int(input())):
	n = input()
	l = []
	for i in range(0, len(n)):
		if n[i] != '0':
			l.append(n[i] + '0' * (len(n) - i - 1))
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


def solve(n):
	(l, ans) = (len(n), [])
	for i in range(l):
		if n[i] != '0':
			ans.append(n[i] + '0' * (l - i - 1))
	return ans

def main():
	t = int(input())
	while t:
		ans = solve(input())
		print(len(ans), ' '.join(ans), sep='\n')
		t -= 1
main()


def checker(s, n, x):
	for i in range(0, n):
		if s[i] == '0':
			continue
		else:
			s1 = s[i]
			for j in range(i + 1, n):
				s1 += '0'
			x.append(s1)
	return x

def printer(x):
	print(len(x))
	for i in range(0, len(x)):
		print(x[i], end=' ')
	print()
t = int(input())
for i in range(0, t):
	s = input()
	n = len(s)
	if n == 1:
		print('1')
		print(s)
	else:
		x = []
		x = checker(s, n, x)
		printer(x)


t = int(input())
for _ in range(t):
	n = str(input())
	l = len(n)
	k = int(n)
	ans = []
	for i in range(l):
		if k <= 0:
			break
		a = int(n[i]) * 10 ** (l - 1 - i)
		if a == 0:
			continue
		ans.append(a)
	print(len(ans))
	for i in range(len(ans)):
		if i == len(ans) - 1:
			print(ans[i])
		else:
			print(ans[i], end=' ')


t = int(input())
arr = []
while t != 0:
	sum = 0
	s = str(input())
	l = len(s)
	for i in range(l):
		a = int(s[i]) * 10 ** (l - i - 1)
		if a != 0:
			arr.append(a)
			sum += 1
	print(sum)
	for i in range(sum):
		print(arr[i], end=' ')
	print()
	arr.clear()
	t -= 1


t = int(input())
for q in range(0, t):
	a = input()
	check = a[0]
	ans = []
	for i in range(1, len(a)):
		if check != '0':
			ans.append(int(check) * 10 ** (len(a) - i))
		check = a[i]
	if check != '0':
		ans.append(int(check))
	print(len(ans))
	print(*ans, sep=' ')


t = int(input())
while t:
	t -= 1
	n = int(input())
	c = 0
	i = 0
	f = []
	while n:
		if n % 10 != 0:
			c += 1
			f.append(n % 10 * 10 ** i)
		n = n // 10
		i += 1
	print(c)
	for i in range(c):
		print(f[i], end=' ')


T = int(input())
while T:
	n = input()
	l = len(n)
	X = []
	for i in range(l):
		if n[i] != '0':
			X.append(int(n[i]) * 10 ** (l - 1 - i))
	print(len(X))
	print(*X)
	T = T - 1


t = int(input())
while t:
	t -= 1
	s = input()
	if len(s) == 1:
		print(1)
		print(s)
	else:
		n = len(s)
		i = n - 1
		b = []
		while i >= 0:
			if s[i] != '0':
				b += [int(s[i]) * 10 ** (n - i - 1)]
			i -= 1
		print(len(b))
		print(*b)


def roundsum(n):
	i = 0
	nums = []
	while n // 10 != 0:
		while n % 10 == 0:
			i += 1
			n = n // 10
		nums.append(n % 10 * 10 ** i)
		i += 1
		n = n // 10
	if n % 10 != 0:
		nums.append(n % 10 * 10 ** i)
	return (len(nums), nums)
t = int(input())
for i in range(t):
	n = int(input())
	(numslen, nums) = roundsum(n)
	print(numslen)
	print(*nums)


def solve():
	s = input()
	ans = []
	for i in range(len(s)):
		if s[i] != '0':
			ans.append(s[i] + '0' * (len(s) - i - 1))
	print(len(ans))
	for x in ans:
		print(x, end=' ')
t = int(input())
for _ in range(t):
	solve()


def sum_of_round_numbers(num):
	res = []
	num = str(num)
	j = len(num) - 1
	for i in range(len(num)):
		temp = int(num[i]) * 10 ** j
		if temp:
			res.append(temp)
		j -= 1
	return res
t = int(input())
while t > 0:
	n = int(input())
	res = sum_of_round_numbers(n)
	print(len(res))
	print(*res)
	t -= 1


def check(n):
	result = []
	while n > 0:
		s = str(n)
		l = len(s) - 1
		result.append(pow(10, l) * int(s[0]))
		n %= result[-1]
	return result
t = int(input())
while t:
	n = int(input())
	result = check(n)
	print(len(result))
	for i in result:
		print(i, end=' ')
	t -= 1


from collections import defaultdict
from math import ceil
t = int(input())
for _ in range(t):
	n = int(input())
	s = str(n)
	total = sum((c != '0' for c in s))
	print(total)
	l = len(s)
	out = []
	for (i, c) in enumerate(s):
		if c != '0':
			out.append(c + '0' * (l - 1 - i))
	print(' '.join(out))


n = int(input())
for i in range(n):
	sps = []
	k = 0
	m = int(input())
	f = m % 10
	if f != 0:
		k += 1
		sps.append(f)
	s = m // 1000 * 1000
	if s != 0:
		k += 1
		sps.append(s)
	th = m // 10 % 10 * 10
	if th != 0:
		k += 1
		sps.append(th)
	chet = m // 10 % 100 // 10 * 100
	if chet != 0:
		k += 1
		sps.append(chet)
	print(k)
	for j in range(len(sps) - 1):
		print(sps[j], end=' ')
	print(sps[-1])


n = int(input())
for _ in range(n):
	num = int(input())
	i = 0
	res = []
	while num > 0:
		d = num % 10
		dd = d * 10 ** i
		if dd > 0:
			res.append(dd)
		num = num // 10
		i += 1
	print(len(res))
	print(' '.join(map(str, res)))


def check(q):
	o = ''
	for i in range(0, q - 1, 1):
		o += '0'
	return o
t = int(input())
while t > 0:
	a = int(input())
	s = str(a)
	n = ''.join(reversed(s))
	d = int(n)
	b = str(d)
	if len(b) == 1:
		print(1)
		print(a)
	else:
		p = []
		cnt = 0
		p2 = []
		d = int(s)
		h = len(s)
		while d != 0:
			r = d % 10
			if r != 0:
				cnt += 1
			p.append(r)
			d = d // 10
		p.reverse()
		print(cnt)
		for i in p:
			z = int(str(i))
			if z > 0:
				print(str(i) + check(h), end=' ')
			h -= 1
		print()
	t -= 1


import math
for i in range(int(input())):
	inp = int(input())
	o = []
	c = 0
	while inp != 0:
		if inp % 10 ** c != 0:
			o.append(inp % 10 ** c)
			inp -= o[-1]
		c += 1
	print(len(o))
	print(' '.join(map(str, o)))


t = int(input())
x = []
for i in range(t):
	n = int(input())
	a = []
	j = 1
	while n > 0:
		c = n % 10
		n = int(n / 10)
		a.append(c * 10 ** (j - 1))
		j += 1
	x.append(a)
for i in x:
	print(len(i) - i.count(0))
	for j in i:
		if j != 0:
			print(j, end=' ')
	print()


t = int(input())
a = []
for i in range(10):
	a.append('0' * i)
ans = []
for i in range(t):
	n = input()
	c = 0
	ans = []
	x = len(n)
	for j in range(x):
		if n[j] + '0' * (x - j - 1) not in a:
			ans.append(n[j] + '0' * (x - j - 1))
			x += 0
	print(len(ans))
	print(*ans)


def solve(n):
	n = str(n)
	output = []
	for (i, s) in enumerate(n):
		if s == '0':
			continue
		output.append(str(s) + '0' * (len(n) - i - 1))
	return output
t = int(input())
for i in range(t):
	n = int(input())
	a = solve(n)
	print(len(a))
	for x in a:
		print(x)


for j in range(int(input())):
	a = input()
	k = a.count('0')
	l = len(a)
	print(l - k)
	for i in range(l):
		if a[i] != '0':
			print(a[i] + '0' * (l - i - 1), end=' ')
	print()


answer = []
t = int(input())
if t >= 1 and t <= 10 ** 4:
	for i in range(t):
		n = input()
		if int(n) >= 1 and int(n) <= 10 ** 4:
			array = []
			j = 0
			x = len(n) - 1
			for i in n:
				if i != str(0):
					array.append(10 ** x * int(i))
					j += 1
				x -= 1
			answer.append(j)
			answer.append(' '.join((str(x) for x in array)))
	for i in answer:
		print(i)


t = int(input())
for _ in range(t):
	n_str = input()
	l = len(n_str)
	r = []
	for (i, v) in enumerate(n_str):
		if v != '0':
			r.append(int(v) * 10 ** (l - (i + 1)))
	print(len(r))
	print(' '.join(map(str, r)))


s = int(input())
for i in range(s):
	number = str(input())
	x = len(number)
	k = int('0')
	for element in number:
		if int(element) > 0:
			k = k + 1
	print(k)
	for element in number:
		if int(element) > 0:
			print(int(element) * 10 ** (x - 1), end=' ')
		x = x - 1
	print()


def main():
	t = int(input())
	for __ in range(t):
		n = int(input())
		count = -1
		ans = []
		k = 0
		while n:
			count += 1
			if n % 10 != 0:
				ans.append(n % 10 * 10 ** count)
				k += 1
			n = n // 10
		print(k)
		print(*ans)
main()


a = int(input())
for i in range(0, a):
	x = input()
	ans = 0
	tmp = len(x) - 1
	for i in x:
		if i != '0':
			ans += 1
	print(ans)
	for i in x:
		if i != '0':
			print(int(i) * 10 ** tmp, end=' ')
		tmp -= 1
	print()


import math

def solution(n):
	digits = int(math.log10(n))
	stack = []
	for x in range(digits + 1):
		if n % 10 != 0:
			stack.append(int(n % 10 * 10 ** x))
		n = int(n / 10)
	print(len(stack))
	for i in range(len(stack)):
		print(stack[i])
t = int(input())
for x in range(t):
	a = int(input())
	solution(a)


t = int(input())
for i in range(t):
	n = int(input())
	ans = list()
	t = 0
	while n != 0:
		if n % 10 > 0:
			ans.append(n % 10 * 10 ** t)
		n //= 10
		t += 1
	print(len(ans))
	for j in ans:
		print(j, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	cnt = 0
	ls = list()
	while n > 0:
		if n % 10:
			ls.append(n % 10 * 10 ** cnt)
		cnt += 1
		n //= 10
	print(len(ls))
	print(*ls)


def function(list_, m, leng):
	c = leng
	count = 0
	for i in range(leng):
		c = c - 1
		if m[i] != '0':
			list_.append(m[i] + '0' * c)
			count = count + 1
	print(count)
	for j in list_:
		print(j, end=' ')
	print()
test_cases = int(input())
for cases in range(test_cases):
	m = str(input())
	leng = len(m)
	list_ = []
	function(list_, m, leng)


def countDigit(n):
	count = 0
	while n != 0:
		n //= 10
		count += 1
	return count

def zero_checker(n):
	c = 0
	while n:
		rem = n % 10
		if rem == 0:
			c = c + 1
		n = n // 10
	return c
test = int(input())
for i in range(test):
	min_nums = 0
	n = int(input())
	num_digits = countDigit(n)
	if num_digits == 1:
		min_nums = 1
		print(min_nums)
		print(n)
	elif n % 10 ** (num_digits - 1) == 0:
		min_nums = 1
		print(min_nums)
		print(n)
	else:
		chk = zero_checker(n)
		min_nums = num_digits - chk
		print(min_nums)
		i = 0
		while n != 0:
			rem = n % 10
			if rem != 0:
				print(rem * 10 ** i, end=' ')
			n = n // 10
			i = i + 1


def sumRoundNum(n):
	z = 1
	l = []
	while n != 0:
		m = n % 10
		if m * z != 0:
			l.append(m * z)
		z *= 10
		n //= 10
	print(len(l))
	print(*l)
tc = int(input())
for i in range(tc):
	num = int(input())
	sumRoundNum(num)


i = int(input())
for _ in range(i):
	number = int(input())
	n = str(number)
	if 0 < number <= 10:
		print('1')
		print(number)
		continue
	l = []
	n_list = list(map(int, n))
	for i in range(len(n_list)):
		if i == len(n_list) - 1:
			w = n_list[i]
		else:
			w = n_list[i] * 10 ** (len(n_list) - i - 1)
		if w != 0:
			l.append(w)
	print(len(l))
	print(*l)
n_list = [1, 2, 3, 4, 5]


a = int(input())
t = 0
h = []
for i in range(0, a):
	t = int(input())
	h = []
	d = 0
	for i in range(0, len(str(t))):
		s = int(str(t)[i])
		if s != 0:
			h.append(s * 10 ** (len(str(t)) - i - 1))
			d += 1
	print(d)
	print(str(h).replace('[', '').replace(']', '').replace(',', ''))


t = int(input())
for _ in range(t):
	n = int(input())
	l = []
	p = 1
	while n > 0:
		digit = n % 10
		n = n // 10
		if digit != 0:
			l.append(digit * p)
		p = p * 10
	print(len(l))
	print(*l)


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


T = int(input())
for t in range(T):
	n = int(input())
	strn = str(n)
	ans = []
	anslen = 0
	for i in range(len(strn)):
		val = int(strn[i])
		if val != 0:
			anslen += 1
			ans.append(str(10 ** (len(strn) - i - 1) * val))
	print(anslen)
	print(' '.join(ans))


import math
for _ in range(int(input())):
	n = int(input())
	if n == 0:
		print(1)
		continue
	i = -1
	c = 0
	ans = []
	while n > 0:
		k = n % 10
		n = n // 10
		i += 1
		if k != 0:
			c += 1
			ans.append(k * 10 ** i)
	print(c)
	ans.sort(reverse=True)
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
while t:
	t = t - 1
	n = input()
	l = list(n)
	m = []
	for i in range(len(l)):
		if int(l[i]) != 0:
			z = int(l[i]) * 10 ** (len(l) - 1 - i)
			m.append(z)
		else:
			continue
	print(len(m))
	print(*m)


for q in range(int(input())):
	s = list(input())
	si = len(s)
	res = []
	cu = 0
	for i in range(si - 1, 0, -1):
		if s[i] != '0':
			res.append(s[i] + '0' * cu)
			s[i] = '0'
		cu += 1
	res.append(''.join(s))
	print(len(res))
	print(*res)


from sys import stdin, stdout
t = int(input())
for _ in range(t):
	n = int(input())
	ls = []
	i = 1
	while n > 0:
		remainder = n % 10
		n //= 10
		if remainder > 0:
			ls.append(str(remainder * i))
		i = i * 10
	print(len(ls))
	print(' '.join(ls))


import math
n = int(input())
for i in range(n):
	num = int(input())
	numbers = [int(x) for x in str(num)]
	ans = ''
	count = 0
	for (index, element) in enumerate(numbers):
		if element != 0:
			ans += str(int(math.pow(10, len(numbers) - index - 1) * element)) + ' '
			count += 1
	print(count)
	print(ans)


import sys

def get_round_numbers(num):
	d = len(num)
	result = set()
	for x in num:
		d = d - 1
		y = 10 ** d
		result.add(int(x) * y)
	if 0 in result:
		result.remove(0)
	return result
data = [i.strip() for i in sys.stdin.readlines()]
for i in range(len(data)):
	if i:
		num = data[i]
		result = get_round_numbers(num)
		print(len(result))
		print(' '.join([str(i) for i in result]))


def solve():
	a = []
	n = int(input())
	count = 0
	l = 0
	while n > 0:
		x = n % 10
		if x:
			a.append(x * 10 ** count)
			l += 1
		count += 1
		n = int(n / 10)
	print(l)
	for ele in a:
		if ele:
			print(ele, end=' ')
	print()
t = int(input())
for _ in range(t):
	solve()


T = int(input())
for i in range(T):
	N = int(input())
	l = []
	r = [N % 10]
	t = 10
	for j in range(len(str(N))):
		l.append(N % t)
		t = t * 10
	for k in range(len(l) - 1):
		r.append(l[k + 1] - l[k])
	while 0 in r:
		r.remove(0)
	if sum(r) == N:
		print(len(r))
		for ele in r:
			print(ele, end=' ')
		print()


n = int(input())
for _ in range(n):
	a = int(input())
	a = str(a)
	b = []
	lenght = len(a)
	for i in range(len(str(a)) - 1, -1, -1):
		if a[i] != '0':
			b.append(a[i] + '0' * (lenght - i - 1))
	print(len(b))
	for i in b:
		print(i, end=' ')


for f in range(int(input())):
	sol = []
	foo = 1
	n = int(input())
	k = 0
	while n > 0:
		while n % 10 == 0:
			n //= 10
			foo *= 10
		x = n % 10
		n -= x
		sol.append(foo * x)
		k += 1
	print(k)
	print(*sol)


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	ws = 1
	b = [0 for i in range(6)]
	jl = 0
	while n > 0:
		a = n % 10
		n = n // 10
		if a != 0:
			b[jl] = a * ws
			jl += 1
		ws *= 10
	print(jl)
	for i in range(0, jl):
		if i == jl - 1:
			print(b[i])
		else:
			print(b[i], end=' ')


t = int(input())
for i in range(t):
	l = list()
	s = input()
	for j in range(1, len(s) + 1):
		if s[-j] != '0':
			l.append(int(s[-j]) * 10 ** (j - 1))
	print(len(l))
	print(*l)


t = int(input())
while t != 0:
	n = int(input())
	i = 0
	li = []
	while n != 0:
		rem = n % 10
		val = rem * 10 ** i
		if val > 0:
			li.append(val)
		n = n // 10
		i = i + 1
	lenn = len(li)
	print(lenn)
	print(*li)
	t = t - 1


t = int(input())
for hh in range(0, t):
	s = input()
	li = []
	for i in range(0, len(s)):
		idx = len(s) - 1 - i
		val = s[i]
		if val != '0':
			ans = int(val) * pow(10, idx)
			li.append(ans)
	print(len(li))
	print(*li)


import sys

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
from math import *
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	print(len(str(n)) - str(n).count('0'))
	s = str(n)
	for i in range(len(s)):
		if s[i] != '0':
			print(int(s[i]) * 10 ** (len(s) - i - 1), end=' ')
	print()


t = int(input())
while t:
	t -= 1
	n = int(input())
	ans = []
	y = 1
	while n >= 1:
		if n % 10:
			ans.append(int(n % 10) * y)
		y *= 10
		n //= 10
	l = len(ans)
	print(l)
	for i in ans:
		print(i, end=' ')
	print(' ')


t = int(input())
for testcase in range(t):
	n = int(input())
	ans = []
	power = 0
	while n > 0:
		digit = n % 10
		if digit > 0:
			ans.append(digit * pow(10, power))
		n = n // 10
		power += 1
	print(len(ans))
	for elem in ans:
		print(elem, end=' ')
	print()


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


ttt = int(input())
for i in range(ttt):
	n = int(input())
	length = len(str(n))
	ans = []
	while length:
		if str(n)[-length] != '0':
			temp = str(n)[-length]
			for j in range(length - 1):
				temp += '0'
			ans.append(temp)
		length -= 1
	print(len(ans))
	for temp in ans:
		print(temp, end=' ')


import math
import bisect
T = int(input())
for t in range(T):
	N = int(input())
	out = []
	d = 1
	while N != 0:
		if N % 10 != 0:
			out.append(str(N % 10 * d))
		d *= 10
		N //= 10
	print(len(out))
	print(' '.join(out))


n = int(input())
for i in range(n):
	x = int(input())
	ans = []
	pw = 1
	while x > 0:
		while x % 10 == 0:
			x //= 10
			pw *= 10
		ans.append(x % 10 * pw)
		x //= 10
		pw *= 10
	print(len(ans))
	for x in ans:
		print(x, end=' ')
	print('\n', end='')


x = int(input())
for i in range(x):
	y = int(input())
	p = str(y)
	u = len(p)
	count = 0
	z = []
	for i in range(u):
		o = int(p[u - i - 1]) * 10 ** i
		if o != 0:
			z.append(o)
			count += 1
	print(count)
	print(*z)


def nod(a, b):
	while a != b:
		(a, b) = (max(a, b), min(a, b))
		if a % b == 0:
			a -= (a // b - 1) * b
		else:
			a -= a // b * b
	return a
for i in range(int(input())):
	n = int(input())
	a = []
	for i in range(len(str(n))):
		if n % 10 != 0:
			a.append(n % 10 * 10 ** i)
		n //= 10
	print(len(a))
	print(*a)


for _ in range(int(input())):
	n = input()
	ans = []
	for q in range(len(n)):
		ans.append(n[q] + '0' * (len(n) - q - 1))
	organs = []
	for q in ans:
		if q[0] == '0':
			continue
		else:
			organs.append(q)
	print(len(organs))
	for q in organs:
		print(q, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = input()
	l = len(n)
	c = 0
	p = []
	for i in range(l):
		r = int(n[i]) * 10 ** (l - 1 - i)
		if r != 0:
			c += 1
			p.append(r)
	print(c)
	for i in p:
		print(i, end=' ')
	print('')


def round_num(num):
	temp_num = list(map(int, str(num)))
	store = []
	track = 0
	for i in range(len(temp_num)):
		my_num_adder = temp_num[i] * 10 ** (len(temp_num) - i - 1)
		if my_num_adder != 0:
			track += 1
			store.append(my_num_adder)
	return (store, track)
T = int(input())
my_nums = []
for i in range(T):
	my_nums.append(round_num(int(input())))
for i in my_nums:
	print(i[1])
	print(*i[0])


for case in range(int(input())):
	n = input()
	nums = []
	for i in range(len(n)):
		if n[i] != '0':
			nums.append(n[i] + '0' * (len(n) - i - 1))
	print(len(nums))
	print(*nums)


for q in range(int(input())):
	res = []
	s = input()
	n = len(s)
	c = 0
	for i in range(n):
		if s[n - i - 1] != '0':
			res.append(s[n - i - 1] + '0' * i)
			c += 1
	print(c)
	print(*res)


import math

def summend(n):
	global count, l
	n1 = len(str(n))
	if n in range(1, 10):
		l.append(n)
		return
	elif n % math.pow(10, n1 - 1) == 0:
		l.append(n)
		return
	l.append(n - n % int(math.pow(10, n1 - 1)))
	count += 1
	summend(n % int(math.pow(10, n1 - 1)))
for _ in range(int(input())):
	n = int(input())
	l = []
	count = 1
	summend(n)
	print(count)
	for i in l:
		print(i, end=' ')
	print()


test_cases = int(input())
while test_cases > 0:
	num = input()
	num = list(num)
	num.reverse()
	toPrint = []
	for i in range(0, len(num)):
		if num[i] > '0':
			toPrint.append(num[i] + '0' * i)
	print(len(toPrint))
	print(*toPrint)
	test_cases -= 1


for u in range(int(input())):
	n = int(input())
	l = []
	s = str(n)
	for i in range(len(s)):
		if s[i] != '0':
			k = s[i] + '0' * (len(s) - i - 1)
			l.append(int(k))
	print(len(l))
	print(*l)


t = int(input())
mas = []
for i in range(t):
	mas.append(input())

def Split(n):
	s = []
	for i in range(len(n)):
		if n[i] != '0':
			s.append(n[i] + '0' * (len(n) - i - 1))
	return s
out = []
for i in range(t):
	out.append(Split(mas[i]))
for i in range(t):
	print(len(out[i]))
	s = ''
	for p in out[i]:
		s += p + ' '
	print(s)


for t in range(int(input())):
	n = input()
	x = len(n) - 1
	p = 10 ** x
	r = []
	for i in n:
		ans = int(i) * p
		if ans != 0:
			r.append(ans)
		p //= 10
	print(len(r))
	print(*r, sep=' ')


for i in range(0, int(input())):
	p = []
	n = int(input())
	q = 0
	while n > 0:
		m = n % 10
		if m != 0:
			p.append(m * 10 ** q)
		q = q + 1
		n = n // 10
	print(len(p))
	for j in p:
		print(j, end=' ')
	print()


from sys import stdin, stdout
from collections import Counter, OrderedDict
import math
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))

def chars():
	s = cin()
	return list(s[:len(s) - 1])

def pl(a):
	for val in a:
		cout(str(val) + ' ')
	cout('\n')
(t,) = mp()
for _ in range(t):
	s = chars()
	n = len(s)
	count = 0
	l = ''
	for i in range(n):
		if s[i] != '0':
			count += 1
			l += s[i] + '0' * (n - i - 1) + ' '
	cout(str(count) + '\n' + l + '\n')


def main():
	tests = int(input())
	for t in range(tests):
		num = input()
		sz = len(num)
		counter = 0
		result = []
		for i in range(0, sz):
			if num[i] != '0':
				counter += 1
				result.append(num[i] + '0' * (sz - i - 1))
		print(counter)
		print(' '.join(result))
main()


items = int(input())
numbers = []
for i in range(items):
	numbers.append(int(input()))

def check(num):
	answer = []
	mnoz = 1
	while num // 10:
		answer.append(int(str(num)[-1]) * mnoz)
		mnoz *= 10
		num = num // 10
	answer.append(num * mnoz)
	reverse = [i for i in answer if i != 0]
	print(len(reverse))
	for i in reverse:
		print(i, end=' ')
	print()
for num in numbers:
	check(num)


import bisect as bi
MAX = 10 ** 4 + 1
roundd = []
roundd_set = set()

def precompute():
	for i in range(1, MAX):
		if str(i).count('0') == len(str(i)) - 1:
			roundd.append(i)
	roundd_set = set(roundd)
	return roundd_set

def search(val):
	(lo, hi) = (0, len(roundd) - 1)
	while lo < hi:
		mid = lo + (hi - lo) // 2
		print(mid)
		if roundd[mid] > val:
			hi = mid
		else:
			lo = mid + 1
	return lo

def solve(n):
	if n in roundd_set:
		return (1, [n])
	num = n
	c = 1
	res = []
	while num not in roundd_set:
		idx = bi.bisect_left(roundd, num)
		res.append(roundd[idx - 1])
		num -= roundd[idx - 1]
		c += 1
	res.append(num)
	return (c, res)
roundd_set = precompute()
for _ in range(int(input())):
	n = int(input())
	result = solve(n)
	print(result[0])
	print(*result[1])


for i in range(int(input())):
	a = input()
	if len(a.replace('0', '')) == 1:
		print(1)
		print(a)
	else:
		b = ''
		count = 0
		for j in range(len(a)):
			if a[j] != '0':
				count += 1
				b += a[j] + '0' * (len(a) - j - 1) + ' '
			else:
				continue
		print(count)
		print(b)


num_of_test = int(input())
for item in range(num_of_test):
	num = int(input())
	op = []
	if num < 10:
		op.append(str(num))
	else:
		n = len(str(num))
		numlist = list(str(num))
		start = 1
		for item in range(n - 1):
			num_m = int(''.join(numlist[start:]))
			t_op = num - num_m
			if t_op == 0:
				pass
			elif t_op == num:
				op.append(str(num))
				break
			elif num_m < 10:
				op.append(str(t_op))
				op.append(str(num_m))
				break
			else:
				op.append(str(t_op))
				num = num_m
			start += 1
	print(str(len(op)))
	print(' '.join(op))


for _ in range(int(input())):
	k = int(input())
	(tmp, p) = ([], 0)
	while k > 0:
		if k % 10 != 0:
			tmp.append(k % 10 * 10 ** p)
		k //= 10
		p += 1
	print(len(tmp))
	print(*tmp)


t = int(input())
for i in range(t):
	n = int(input())
	x = n
	s = 0
	a = 0
	while x > 0:
		s = s + 1
		if x % 10 != 0:
			a = a + 1
		x = x // 10
	print(a)
	for i in range(s):
		y = n % 10
		z = y * 10 ** i
		if z != 0:
			print(z, end=' ')
			a = a + 1
		n = n // 10
	print()


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


t = int(input())
for _ in range(t):
	n = int(input())
	l = [0] * 100
	(ind, d) = (0, 1)
	while n != 0:
		l[ind] = n % 10 * d
		d *= 10
		if l[ind] != 0:
			ind += 1
		n = n // 10
	print(ind)
	for i in range(ind - 1, -1, -1):
		print(l[i], end=' ')


t = int(input())
for i in range(t):
	numList = list(map(int, input()))
	x = []
	for j in range(len(numList)):
		k = numList[j] * pow(10, len(numList) - j - 1)
		if k == 0:
			continue
		else:
			x.append(k)
	print(len(x))
	for z in x:
		print(z, end=' ')


from math import log10
t = int(input())

def isRound(n):
	if n <= 9:
		return True
	else:
		while n >= 10:
			if n % 10 != 0:
				return False
			n = n / 10
		return True
for i in range(t):
	s = input()
	n = int(s)
	if isRound(n):
		print(1)
		print(n)
	else:
		nums = []
		while n >= 10:
			ex = int(log10(n))
			rem = n // 10 ** ex
			max_round = rem * 10 ** ex
			nums.append(max_round)
			n -= max_round
		print(len(nums) + 1 if n != 0 else len(nums))
		for x in nums:
			print(x, end=' ')
		if n != 0:
			print(n, end=' ')
		print()


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)


p = int(input())
a = 0
b = []
conta = 0
conta2 = 0
for x in range(p):
	a = input()
	for y in a:
		if y != 0:
			conta += 1
			b.append([y, len(a) - conta])
	conta = 0
	for y in range(len(b)):
		if b[y][0] != '0':
			conta2 += 1
	print(conta2)
	for y in range(len(b)):
		if b[y][0] != '0':
			print(str(b[y][0]) + '0' * int(b[y][1]), end=' ')
	print()
	b = []
	conta2 = 0


t = int(input())
for _ in range(t):
	n = 0
	s = input()
	for i in range(len(s)):
		if s[i] != '0':
			n += 1
	print(n)
	for i in range(len(s)):
		if s[i] != '0':
			print(s[i] + '0' * (len(s) - i - 1), end=' ')
	print('')
	pass


import sys, bisect
from math import gcd
input = sys.stdin.readline

def inp():
	return int(input().rstrip())

def inlt():
	return list(map(int, input().rstrip().split()))

def insr():
	s = input().rstrip()
	return s[:len(s) - 1]

def invr():
	return map(int, input().rstrip().split())
times = 60
t = inp()
for _ in range(t):
	n = input().strip()
	ans = []
	while True:
		has = True
		s = n[0]
		for i in range(len(n) - 1):
			s += '0'
		ans.append(s)
		s = ''
		for i in n[1:]:
			if i != '0':
				s += i
				has = False
			elif not has:
				s += i
		n = s
		if s == '':
			break
	print(len(ans))
	print(*ans)


test = int(input())
for t in range(test):
	n = int(input())
	pval = 0
	strn = str(n)
	idx = len(strn) - 1
	l = []
	sout = ''
	while idx >= 0:
		if strn[idx] == '0':
			idx -= 1
			pval += 1
		else:
			l.append(int(strn[idx]) * 10 ** pval)
			sout += str(int(strn[idx]) * 10 ** pval) + ' '
			pval += 1
			idx -= 1
	print(len(l))
	for k in range(len(l)):
		print(str(l[k]) + ' ', end='')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	count = 0
	arr = []
	i = 0
	while n != 0:
		nos = n % 10
		if nos != 0:
			arr.append(nos * 10 ** i)
			count += 1
		n //= 10
		i = i + 1
	print(count)
	print(*arr)


def solve(num):
	if num <= 10:
		print(1)
		print(num)
		return
	s = str(num)
	ans = 0
	l = []
	for i in range(len(s)):
		xx = int(s[i]) * pow(10, len(s) - i - 1)
		if xx != 0:
			l.append(xx)
			ans += 1
	print(ans)
	print(*l)
	return

def main():
	t = int(input())
	while t > 0:
		n = int(input())
		solve(n)
		t -= 1
main()


t = int(input())
for j in range(t):
	x = input()
	k = 0
	i = 0
	A = []
	while i < len(x):
		if x[i] != '0':
			k += 1
			A.append(x[i] + '0' * (len(x) - 1 - i))
		i += 1
	print(k)
	print(' '.join(A))


t = int(input())
for a in range(t):
	n = int(input())
	print(len(str(n)) - str(n).count('0'))
	answer = ''
	mutliplier = 1
	while n > 0:
		if n % 10 != 0:
			answer += str(n % 10 * mutliplier) + ' '
		n = n // 10
		mutliplier *= 10
	print(answer)


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


def main():
	test_cases = int(input())
	round_nums = [10000]
	for num in range(1, 10):
		num = str(num)
		for i in range(4):
			new_num = num + '0' * i
			round_nums.append(int(new_num))
	round_nums.sort()
	for _ in range(test_cases):
		target_num = int(input())
		count = 0
		result = []
		while target_num > 0:
			flag = True
			i = 0
			while i < len(round_nums) and flag:
				if round_nums[i] >= target_num:
					count += 1
					if target_num == round_nums[i]:
						target_num -= round_nums[i]
						result.append(str(round_nums[i]))
					else:
						target_num -= round_nums[i - 1]
						result.append(str(round_nums[i - 1]))
					flag = False
				i += 1
		print(count)
		print(' '.join(result))
main()


t = int(input())
for i in range(t):
	n = int(input())
	l = len(str(n))
	a = []
	div = 1
	for i in range(l - 1):
		div = div * 10
	while div != 1:
		if n // div * div != 0:
			a.append(n // div * div)
		n = n % div
		div = div // 10
	if n != 0:
		a.append(n)
	print(len(a))
	print(' '.join(map(str, a)))


n = int(input())
import sys
for line in sys.stdin:
	count = 0
	num = line.rstrip()
	x = len(num) - 1
	string = ''
	for val in num:
		if int(val) != 0:
			count += 1
			string += val + x * '0' + ' '
		x -= 1
	print(count)
	print(string)


def solve():
	n = int(input())
	ans = []
	cnt = 0
	k = 1
	while n:
		if n % 10 != 0:
			cnt += 1
			ans.append(n % 10 * k)
		n //= 10
		k *= 10
	print(cnt)
	print(*ans)
for _ in range(int(input())):
	solve()


t = int(input())
for _ in range(t):
	n = int(input())
	x = 1
	ans = 0
	temp = n
	d = []
	s = str(n)
	x = 10 ** (len(s) - 1)
	for i in range(len(s) - 1):
		if s[i] != '0' and s[i + 1] != '0':
			ans += 1
			d.append(int(x * int(s[i])))
			x = x / 10
		elif s[i] != '0' and s[i + 1] == '0':
			d.append(int(x * int(s[i])))
			ans += 1
			x = x / 10
		else:
			x = x / 10
	if s[-1] != '0':
		ans += 1
		d.append(s[-1])
	print(ans)
	print(' '.join((str(f) for f in d)))


n = int(input())
for i in range(n):
	a = input()
	s = 0
	r = []
	for h in range(len(a)):
		if not a[h] == '0':
			r.append(a[h] + '0' * (len(a) - h - 1))
			s += 1
	print(s)
	print(*r)


t = int(input())

def solve(n):
	d = 1
	an = []
	k = 0
	while n > 0:
		if n % 10 * d != 0:
			an.append(n % 10 * d)
			k += 1
		d *= 10
		n //= 10
	an = [str(x) for x in an]
	return (k, ' '.join(an))
for _ in range(t):
	n = int(input())
	a = solve(n)
	print(a[0])
	print(a[1])


T = int(input())
for _ in range(T):
	N = input()
	ans = []
	for (i, c) in enumerate(N):
		if int(c):
			ans.append(int(c) * 10 ** (len(N) - i - 1))
	print(len(ans))
	print(*ans)


for _ in range(int(input())):
	n = list(input())
	arr = []
	n.reverse()
	for i in range(len(n)):
		x = int(n[i]) % 10
		if x != 0:
			x = x * 10 ** i
			arr.append(x)
	arr.reverse()
	print(len(arr))
	for i in arr:
		print(i, end=' ')


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


t = int(input())
for i in range(t):
	n = int(input())
	s = str(n)
	l = len(s)
	count = 0
	p = []
	for i in range(0, l):
		if s[i] != '0':
			x = int(s[i]) * pow(10, l - i - 1)
			if x != 0:
				count += 1
				p.append(x)
	print(count)
	print(*p)


n = int(input())
x = [int(input()) for _ in range(n)]
for i in x:
	c = []
	power = 1
	while i > 0:
		if i % 10 > 0:
			c.append(i % 10 * power)
		i = i // 10
		power = power * 10
	print(len(c))
	for j in c:
		print(j, end=' ')
	print()


t = int(input())
while t:
	s = input()
	l = len(s)
	cnt = 0
	for x in s:
		if x != '0':
			cnt = cnt + 1
	print(cnt)
	for x in s:
		l = l - 1
		if x != '0':
			print(x, end='')
			c = 0
			while c < l:
				print(0, end='')
				c = c + 1
			print(end=' ')
	print()
	t = t - 1


import sys
import math

def ii():
	return sys.stdin.readline().strip()

def idata():
	return [int(x) for x in ii().split()]

def solve_of_problem():
	n = input()
	a = len(n)
	ans = []
	for i in range(a - 1, -1, -1):
		if n[i] != '0':
			ans += [n[i] + '0' * (a - 1 - i)]
	print(len(ans))
	print(*ans)
	return
for ______ in range(int(ii())):
	solve_of_problem()


t = int(input(''))
for i in range(0, t):
	n = int(input(''))
	cnt = 0
	tmp = n % 10
	result = []
	if tmp != 0:
		result.append(tmp)
	cnt += 1
	while True:
		n //= 10
		cur = n % 10 * 10 ** cnt
		cnt += 1
		if n == 0:
			break
		if cur == 0:
			continue
		result.append(cur)
	print(len(result))
	for num in result:
		print(num, end=' ')
	print()


t = int(input())
s = ''
for i in range(t):
	s1 = ''
	s2 = ''
	s3 = ''
	s4 = ''
	s5 = ''
	s = ''
	k = 0
	a = int(input())
	s5 = str(a % 10)
	s4 = str(a // 10 % 10 * 10)
	s3 = str(a // 100 % 10 * 100)
	s2 = str(a // 1000 % 10 * 1000)
	s1 = str(a // 10000 * 10000)
	if s1 != '0':
		s = s + s1 + ' '
		k += 1
	if s2 != '0':
		s = s + s2 + ' '
		k += 1
	if s3 != '0':
		s = s + s3 + ' '
		k += 1
	if s4 != '0':
		s = s + s4 + ' '
		k += 1
	if s5 != '0':
		s = s + s5 + ' '
		k += 1
	print(k)
	print(s)


import sys
lst = []
for line in sys.stdin:
	lst += [int(line.split('\n')[0])]
t = lst[0]
for i in range(t):
	ans = []
	n = lst[i + 1]
	while n > 0:
		ans.append(n % 10)
		n //= 10
	ans = [str(each * 10 ** index) for (index, each) in enumerate(ans) if each > 0]
	print(len(ans))
	ans = ' '.join(ans)
	print(ans)


import sys
input = sys.stdin.readline

def main():
	for t in range(int(input())):
		n = int(input())
		sol = []
		p = 1
		while n != 0:
			if n % 10 != 0:
				sol += [n % 10 * p]
			n = n // 10
			p *= 10
		print(len(sol))
		print(*sol)
main()


num = int(input())
while num > 0:
	num = num - 1
	t = int(input())
	if t < 10:
		print('1')
		print(t)
	else:
		check = str(t)
		l = len(check)
		list = [None] * l
		count = 0
		m = 0
		for i in range(0, l):
			j = l - 1
			y = int(check[i])
			if y != 0:
				temp = str(0)
				j = j - i
				st = str(y)
				temp = temp * j
				st = st + temp
				count = count + 1
				list[m] = st
				m = m + 1
		print(count)
		for i in range(0, m):
			print(list[i], end=' ')
		print()


from sys import stdin
N = int(stdin.readline())
for number in range(N):
	number = stdin.readline().strip()
	print(len([number[i] + '0' * (len(number) - i - 1) for i in range(len(number)) if number[i] != '0']))
	print(' '.join([number[i] + '0' * (len(number) - i - 1) for i in range(len(number)) if number[i] != '0']))


t = int(input())
for i in range(0, t):
	n = int(input())
	c = 1
	count = 0
	l = []
	while n:
		if n % 10:
			p = n % 10 * c
			count = count + 1
			l.append(p)
		n = n // 10
		c = c * 10
	print(count)
	for x in l:
		print(x, end=' ')


import sys
k = 0
t = int(sys.stdin.readline().split()[0])
for i in range(t):
	number = sys.stdin.readline().split()[0]
	k = 0
	result = ''
	for j in range(len(number)):
		a = int(number[j])
		a = a * pow(10, len(number) - (j + 1))
		if a != 0:
			k += 1
			result = result + str(a) + ' '
	print(k)
	print(result)


t = int(input())
for i in range(t):
	n = int(input())
	st = str(n)
	x = []
	count = 0
	for i in range(len(st)):
		if st[i] != '0':
			count += 1
			no = len(st) - i - 1
			res = st[i].ljust(no + len(st[i]), '0')
			x.append(res)
	print(count)
	for aa in x:
		print(aa, end=' ')


for _ in range(int(input())):
	n = int(input())
	count = 0
	a = []
	b = 0
	while n > 0:
		if n % 10 != 0:
			a.append(n % 10 * 10 ** count)
			b += 1
		count += 1
		n = n // 10
	print(b)
	print(*a)


x = []
r = int(input())
for l in range(r):
	t = int(input())
	t = str(t)
	lll = len(t)
	for i in range(lll):
		if int(t[i]) != 0:
			s = int(t[i])
			x.append(s * 10 ** (lll - i - 1))
	print(len(x))
	print(' '.join([str(x) for x in x]))
	x = []


t = int(input())
while t > 0:
	n = int(input())
	digits = []
	while n > 0:
		r = n % 10
		n = n // 10
		digits.append(r)
	i = 0
	ans = ''
	count = 0
	while i < len(digits):
		x = digits[i]
		if x != 0:
			count = count + 1
			value = x * 10 ** i
			if len(ans) > 0:
				ans = ans + ' '
			ans = ans + str(value)
		i = i + 1
	print(count)
	print(ans)
	t = t - 1


counter = int(input())
for i in range(counter):
	n = int(input())
	array = [int(i) for i in str(n)]
	size = len(array)
	index = 0
	result = []
	for i in range(size - 1, -1, -1):
		if array[index] != 0:
			result.append(array[index] * 10 ** i)
		index += 1
	print(len(result))
	for i in result:
		print(i, end=' ')


import sys
import math

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	s = input()
	n = len(s)
	m = 0
	for i in range(n):
		if s[i] == '0':
			continue
		else:
			m = m + 1
	print(m)
	for i in range(len(s)):
		if s[i] == '0':
			n = n - 1
			continue
		else:
			print(str(s[i]) + '0' * (n - 1), end=' ')
			n = n - 1
	print()


t = int(input())
for i in range(t):
	n = int(input())
	l = list()
	c = 0
	if 1 <= n <= 9:
		l.append(n)
	else:
		while n > 0:
			b = n % 10
			if b != 0:
				b = b * 10 ** c
				l.append(b)
			c += 1
			n = n // 10
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()


for ii in range(int(input())):
	n = int(input())
	b = str(n)
	c = len(b)
	ans = []
	for i in range(len(b)):
		if b[i] != '0':
			ans.append(int(b[i]) * 10 ** (c - 1 - i))
	print(len(ans))
	print(*ans)


t = int(input())
for i in range(t):
	n = int(input())
	summands = []
	for j in str(n):
		summands.append(j + '0' * (len(str(n)) - 1 - len(summands)))
	summands_int = 0
	for j in summands:
		if j[0] != '0':
			summands_int += 1
	print(summands_int)
	print(' '.join((i for i in summands if i[0] != '0')))


num_lines = int(input())
lines = [[int(k) for k in input().split()] for i in range(num_lines)]
for line in lines:
	line = reversed(list(str(line[0])))
	lst = []
	for (ind, k) in enumerate(line):
		if k == '0':
			continue
		lst.append(str(int(k) * 10 ** ind))
	print(len(lst))
	print(' '.join(lst))


TC = int(input())
for i in range(TC):
	ans = 0
	ans_list = []
	n = int(input())
	cnt = 1
	while n > 0:
		target = n % 10
		if target != 0:
			ans += cnt * target
			ans_list.append(ans)
			ans = 0
		cnt *= 10
		n = n // 10
	print(len(ans_list))
	for elem in ans_list[::-1]:
		print(elem, end=' ')
	print()


test = int(input())
test_cases = []
for t in range(0, test):
	num = int(input())
	test_cases.append(num)
for n in test_cases:
	pos_nums = []
	c = 1
	count = 0
	while n != 0:
		z = n % 10
		pos_nums.append(z * c)
		n = n // 10
		c = c * 10
	for i in pos_nums:
		if i != 0:
			count += 1
	print(count)
	for i in pos_nums:
		if i != 0:
			print(i, end=' ')
	print('\n')


for _ in range(int(input())):
	n = input()
	l = len(n)
	j = l - 1
	c = 0
	a = []
	for i in range(l):
		if n[i] != '0':
			an = int(n[i]) * 10 ** j
			a.append(str(an))
			c = c + 1
		j = j - 1
	print(c)
	s = ' '.join(a)
	print(s)


t = int(input())
for _ in range(t):
	n = int(input())
	s = str(n)
	l = list(s)
	a = len(l)
	zero = l.count('0')
	print(a - zero)
	for i in range(a):
		if l[i] > '0':
			b = int(l[i])
			c = a - 1 - i
			print(b * 10 ** c, end=' ')
	print()


t = input()
list_num = []
list_of_num_num = []
list_of_fal_and_tru = []
list_of_num_3 = []
cnt = 0
for i in range(int(t)):
	list_num.append(input())
	if int(list_num[i]) in range(1, 11):
		list_of_fal_and_tru.append(True)
	else:
		for j in range(1, len(list_num[i])):
			if int(list_num[i][j]) != 0:
				list_of_fal_and_tru.append(False)
				break
			elif j == len(list_num[i]) - 1:
				list_of_fal_and_tru.append(True)
				break
			else:
				continue
for i in range(len(list_num)):
	cnt = 0
	if list_of_fal_and_tru[i] == True:
		list_of_num_num.append('1')
		list_of_num_3.append(list_num[i])
	elif list_of_fal_and_tru[i] == False:
		for j in range(1, len(list_num[i])):
			if list_num[i][j] == '0':
				cnt += 1
		list_of_num_num.append(len(list_num[i]) - cnt)
		for k in range(len(list_num[i])):
			if list_num[i][k] != '0':
				list_of_num_3.append(list_num[i][k] + '0' * (len(list_num[i]) - k - 1))
cnt_1 = int(list_of_num_num[0])
for i in range(int(t)):
	print(str(list_of_num_num[i]))
	for j in range(int(list_of_num_num[i])):
		if i == 0:
			print(list_of_num_3[j], end=' ')
		else:
			cnt_1 += 1
			print(list_of_num_3[cnt_1 - 1], end=' ')
		if j == int(list_of_num_num[i]) - 1:
			print(end='\n')


q = int(input())
for i in range(q):
	s = input()
	if int(s) <= 10:
		print(1)
		print(s)
	else:
		cnt = 0
		for i in s:
			if i != '0':
				cnt += 1
		print(cnt)
		for i in range(len(s)):
			if s[i] != '0':
				print(s[i], end='')
				print('0' * (len(s) - i - 1), end=' ')
		print()


queries = int(input())
for _ in range(queries):
	number = int(input())
	zeroes = 1
	numbers = []
	while number > 0:
		rest = number % 10
		if rest != 0:
			numbers.append(rest * zeroes)
		zeroes *= 10
		number //= 10
	print(len(numbers))
	result = ''
	for item in numbers:
		result += str(item) + ' '
	print(result)


INPUT = True

def func(ip):
	num = ip
	temp_ls = []
	res_ls = []
	for i in str(num):
		temp_ls.append(int(i))
	for i in range(len(temp_ls)):
		if i == 0 and temp_ls[i] != 0:
			temp = True
			res_ls.append(temp_ls[i] * 10 ** (len(temp_ls) - 1))
		elif temp and temp_ls[i] != 0:
			res_ls.append(temp_ls[i] * 10 ** (len(temp_ls) - i - 1))
	temp = False
	return res_ls
func_ls = []
while INPUT:
	t = input()
	for i in range(int(t)):
		ip = input()
		ip = int(ip)
		if ip <= 10 ** 4 and ip >= 1:
			func_ls.append(func(ip))
	for i in range(len(func_ls)):
		t_ls = []
		print(len(func_ls[i]))
		t_ls = map(str, func_ls[i])
		print(' '.join(t_ls))
	INPUT = False


def to_list(s):
	return list(map(lambda x: int(x), s.split(' ')))

def solve(s):
	if len(s) == 1:
		print(1)
		print(s)
	if len(s) > 1:
		answers = []
		n = len(s)
		for i in range(n):
			number = str(int(s[i]) * 10 ** (n - i - 1))
			if number != '0':
				answers.append(number)
		print(len(answers))
		print(' '.join(answers))
t = int(input())
for i in range(t):
	s = input()
	solve(s)


t = int(input())
for x in range(t):
	n = int(input())
	i = n
	k = 0
	result = []
	temp = 1
	while i > 0:
		j = i % 10
		if j != 0:
			result.append(j * temp)
			k += 1
		temp *= 10
		i //= 10
	print(k)
	for i in range(k):
		print(result[i], end=' ')
	print()


t = int(input())
for i in range(t):
	o = []
	n = list(map(int, list(input())))[::-1]
	for (idx, num) in enumerate(n):
		if num != 0:
			o.append(str(num * 10 ** idx))
	print(len(o))
	print(' '.join(o))


from math import sqrt
t = int(input())
for i in range(t):
	n = int(input())
	pow = 0
	arr = []
	while n:
		x = n % 10
		if x != 0:
			arr.append(x * 10 ** pow)
		n = n // 10
		pow += 1
	print(len(arr))
	print(*arr, sep=' ')


n = int(input())
lst = []
for i in range(n):
	cmd = int(input())
	lst.append(cmd)
for j in lst:
	count = 0
	i = 0
	main = []
	while j > 0:
		v = j % 10
		if v != 0:
			count += 1
			mul = v * 10 ** i
			main.append(mul)
		i += 1
		j = j // 10
	print(count)
	main.reverse()
	st = ' '.join((str(elem) for elem in main))
	print(st)


t = int(input())
for z in range(t):
	ans = []
	n = list(input())
	count = 0
	for i in range(len(n)):
		if int(n[i]) > 0:
			temp = str(n[i]) + str('0' * (len(n) - i - 1))
			ans.append(temp)
			count += 1
	print(count)
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	k = int(input())
	l = []
	while k // 10 != 0:
		rem = k % 10
		l.append(rem)
		k = k // 10
	l.append(k)
	la = []
	for p in l:
		if p != 0:
			la.append(p)
	print(len(la))
	for j in range(len(l)):
		if 10 ** j * l[j] != 0:
			print(10 ** j * l[j], end=' ')
	print()


digit = 0
nbSum = 1
nbMult = 0
flag = 0
array = []

def init():
	global digit, nbSum, nbMult, flag, array
	digit = 0
	nbSum = 1
	nbMult = 0
	flag = 0
	array = []
	return

def execution(x):
	global digit, nbSum, flag
	if x % 10 != 0:
		nbSum += 1
		flag = 1
		while x % 10 != 0:
			x -= 1
			digit += 1
		array.append(digit)
	else:
		flag = 0
	return

def resolveProblem():
	global digit, nbSum, nbMult, flag
	t = int(input())
	while t // 10 > 0:
		execution(t)
		digit = 0
		t = t // 10
		if nbMult > 0 and flag == 1:
			array[-1] = array[-1] * 10 ** nbMult
			flag = 0
		nbMult += 1
	array.append(t * 10 ** nbMult)
	return
n = int(input())
for i in range(n):
	init()
	resolveProblem()
	print(nbSum)
	for j in range(nbSum):
		if j == nbSum - 1:
			print(array[j])
		else:
			print(array[j], end=' ')


t = int(input())
for _ in range(t):
	n = int(input())
	answer = list()
	c = len(str(n)) - 1
	while c >= 0:
		temp = n // 10 ** c * 10 ** c
		if temp != 0:
			answer.append(temp)
		n = n % 10 ** c
		c -= 1
	print(len(answer))
	print(*answer)


t = int(input())
for i in range(t):
	lista = []
	number = int(input())
	cont = 1
	while True:
		aux = number % 10
		number //= 10
		if aux != 0:
			lista.append(aux * cont)
		if number <= 0:
			break
		cont *= 10
	print(len(lista))
	print(*lista)


a = []
for _ in range(int(input())):
	a.append(input())
for num in a:
	arr = []
	for (razrad, number) in enumerate(num):
		if number != '0':
			arr.append(int(number) * 10 ** (len(num) - razrad - 1))
	print(len(arr))
	for i in arr:
		print(i, end=' ')
	print()


import sys
from collections import Counter
inp = sys.stdin.readline
read = lambda : list(map(int, inp().strip().split()))

def a():
	ans = ''
	for _ in range(int(inp())):
		n = int(inp())
		tem = ''
		x = 0
		c = 0
		while n:
			if n % 10:
				c += 1
				tem += str(n % 10 * 10 ** x) + ' '
			x += 1
			n //= 10
		ans += str(c) + '\n' + tem + '\n'
	print(ans)
a()


def all_zeros(val):
	for i in val:
		if i != '0':
			return False
	return True

def is_round(val):
	return val[0] != 0 and all_zeros(val[1:])
for t in range(int(input())):
	n = input()
	summands = list()
	for (i, x) in enumerate(n):
		if x == '0':
			continue
		summands.append(x + '0' * (len(n) - i - 1))
	print(len(summands))
	print(' '.join(summands))


k = int(input())
numbers = []
for number in range(1, k + 1):
	numbers.append(int(input()))
for i in numbers:
	spisok = []
	summa = i
	delit = 1
	for j in range(len(str(i))):
		delit *= 10
		if summa // delit != summa / delit:
			spisok.append(summa - summa // delit * delit)
		summa = summa // delit * delit
	print(len(spisok))
	print(' '.join(map(str, spisok)))


from sys import stdin, stdout

def main():
	lines = stdin.readlines()
	tc = lines[0]
	for line in lines[1:]:
		line = line.strip()
		res = []
		n = len(line)
		for (idx, c) in enumerate(line):
			if c != '0':
				res.append(c + '0' * (n - idx - 1))
		stdout.write('{}\n'.format(len(res)))
		stdout.write('{}'.format(res[0]))
		for aux in res[1:]:
			stdout.write(' {}'.format(aux))
		stdout.write('\n')
main()


t = int(input())
for i in range(t):
	a = int(input())
	k = 0
	x = 10
	result = ''
	for j in range(5):
		b = a % x
		if b != 0:
			k += 1
			result = result + str(b) + ' '
		a = a - b
		x = x * 10
	print(k)
	print(result)


for i in range(int(input())):
	n = int(input())
	l = []
	c = 0
	while n > 9:
		r = n % 10
		if r != 0:
			r = r * 10 ** c
			l.append(r)
			c = c + 1
		else:
			c = c + 1
		n = n // 10
	r = n * 10 ** c
	l.append(r)
	print(len(l))
	print(*l)


t = int(input())
for i in range(0, t):
	n = int(input())
	p = 10
	a = []
	b = 0
	while n > 0:
		if n % p != 0:
			b += 1
			a.append(n % p)
			n -= n % p
		p *= 10
	print(b)
	for i in range(0, b):
		print(a[i], end=' ')
	print('')


T = int(input())
for test in range(T):
	n = list(input())
	length = len(n)
	count = 0
	lst = []
	for i in range(length):
		if n[i] != '0':
			count += 1
			lst.append(int(n[i]) * 10 ** (length - i - 1))
	print(count)
	for i in lst:
		print(i, end=' ')
	print()


test = int(input())

def validate(n):
	flag = 1
	while len(str(n)) > 0:
		d = n % 10
		if d != 0:
			flag = 0
			break
		n = n // 10
	if flag == 0:
		return False
	else:
		return True
for t in range(test):
	lst = []
	n = int(input())
	if n >= 0 and n < 10:
		print(1)
		print(n)
	elif validate(n) == True:
		print(1)
		print(n)
	else:
		mul = 1
		while n != 0:
			d = n % 10
			if d != 0:
				lst.append(mul * d)
			mul *= 10
			n = n // 10
		print(len(lst))
		for i in range(len(lst) - 1):
			print(lst[i], end=' ')
		print(lst[-1])


t = int(input())
for _ in range(t):
	n = int(input())
	n = str(n)
	(v, c, l) = (len(n) - 1, 0, [])
	for i in n:
		if i != '0':
			l.append(i + '0' * v)
			c += 1
			v -= 1
		else:
			v -= 1
	print(c)
	for i in l:
		print(i, end=' ')


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


t = int(input())
while t:
	t -= 1
	n = input()
	nlen = len(n)
	count = 0
	lis = list()
	for i in range(nlen):
		if n[i] != '0':
			count += 1
			lis.append(int(n[i]) * pow(10, nlen - i - 1))
	print(count)
	for i in lis:
		print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	local = input()
	data = []
	for j in range(len(local)):
		if int(local[j]) * 10 ** (len(local) - j - 1) != 0:
			data.append(int(local[j]) * 10 ** (len(local) - j - 1))
	print(len(data))
	for j in data:
		print(j, end=' ')
	print()


for i in range(int(input())):
	num = int(input())
	div = 10
	divs = []
	while num != 0:
		r = num % div
		if r == 0:
			div *= 10
			continue
		else:
			num -= r
			divs.append(r)
			continue
	print(int(len(divs)))
	print(*divs)


t = int(input())
for i in range(t):
	n = list(input())
	r = len(n)
	s = []
	if n.count('0') == r - 1:
		print(1)
		print(''.join(n))
	else:
		for i in range(len(n)):
			f = int(n[i]) * 10 ** (r - (i + 1))
			if f == 0:
				continue
			else:
				s.append(f)
		print(len(s))
		print(*s)


tt = int(input())
while tt:
	n = str(input())
	A = []
	counter = 0
	for x in n:
		if x == '0':
			counter += 1
			continue
		t = x + '0' * (len(n) - counter - 1)
		counter += 1
		A.append(t)
	print(len(A))
	ans = ''
	for s in A:
		ans += s + ' '
	print(ans)
	tt -= 1


t = int(input())
for i in range(t):
	ans = 0
	x = input()
	for j in x:
		if j != '0':
			ans = ans + 1
	print(ans)
	for k in range(len(x)):
		if x[k] != '0':
			print(int(x[k]) * 10 ** (len(x) - k - 1), end=' ')


import math

def facts(n):
	ans = []
	for i in range(2, int(math.sqrt(n) + 1)):
		if n % i == 0:
			ans.append(i)
			ans.append(n // i)
	ans = sorted(ans)
	return ans
for _ in range(int(input())):
	p = 1
	n = int(input())
	ans = []
	while p <= len(str(n)):
		rem = n % 10 ** p
		if rem != 0:
			n -= rem
			ans.append(str(rem))
		p += 1
	print(len(ans))
	print(' '.join(ans))


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	for t in range(I()):
		n = input()
		res = 1
		lis = []
		for i in range(len(n)):
			if n[len(n) - i - 1] != '0':
				lis.append(res * int(n[len(n) - i - 1]))
			res *= 10
		print(len(lis))
		print(*lis)
main()


t = int(input())
for case in range(t):
	p10 = 1
	n = int(input())
	ans = []
	while n > 0:
		if n % 10 != 0:
			ans.append(n % 10 * p10)
			n -= n % 10
		p10 *= 10
		n //= 10
	print(len(ans))
	print(' '.join(list(map(str, ans))))


t = int(input())
for i in range(t):
	n = int(input())
	num_zeros = 0
	last_dig = 0
	round_num = []
	while n != 0:
		last_dig = n % 10
		n = n // 10
		num_zeros += 1
		if last_dig != 0:
			round_num.append(str(last_dig).ljust(num_zeros, '0'))
	print(len(round_num))
	print(' '.join(round_num))


t = int(input())
for tt in range(t):
	s = input()
	n = len(s)
	i = 0
	count = 0
	sums = list()
	while i < n:
		if s[i] != '0':
			save = s[i]
			initial = i
			i += 1
			while i < n and s[i] == '0':
				i += 1
			count += 1
			sums.append(save + (n - initial - 1) * '0')
	print(count)
	print(*sums)


for _ in range(int(input())):
	a = input()
	print(len(a) - a.count('0'))
	print(*list((int(a[i]) * 10 ** (len(a) - i - 1) if int(a[i]) > 0 else '' for i in range(len(a)))))


t = int(input())
for i in range(t):
	n = int(input())
	l = []
	flag = 0
	k = 1
	while n > 10:
		if n % 10 != 0:
			l.append(n % 10 * 10 ** flag)
			k = k + 1
		n = n // 10
		flag = flag + 1
	l.append(n * 10 ** flag)
	print(k)
	print(*l)


def func(nums):
	num = nums[::-1]
	count = 0
	ans = ''
	for i in range(len(nums)):
		if num[i] != '0':
			ans += str(int(num[i])) + str(int(i) * '0') + ' '
			count += 1
	print(count)
	return ans
t = int(input())
for i in range(t):
	wor = input()
	print(func(wor))


for _ in range(int(input())):
	n = int(input())
	cnt = 0
	pm = 1
	arr = []
	while n != 0:
		rem = n % 10
		if rem:
			arr.append(rem * pm)
		n //= 10
		pm *= 10
	print(len(arr))
	for k in arr:
		print(k, end=' ')
	print()


t = int(input())
for i in range(t):
	num = int(input())
	temp_num = num
	ls = []
	while temp_num != 0:
		l = len(str(temp_num)) - 1
		n = temp_num // 10 ** l
		n *= 10 ** l
		ls.append(n)
		temp_num -= n
	print(len(ls))
	print(*ls)


t = int(input())
while t > 0:
	n = int(input())
	digits = [int(x) for x in str(n)]
	length = len(digits)
	result = []
	for i in range(len(digits)):
		if digits[i] != 0:
			result.append(int(digits[i]) * 10 ** (length - i - 1))
	print(len(result))
	for item in result:
		print(item, end=' ')
	print()
	t -= 1


import sys
from collections import defaultdict
import random
import math

def chk(s):
	for i in s:
		if i != '0':
			return 0
	return 1

def round(s):
	if len(s) == 1:
		return 1
	if s[0] != '0' and chk(s[1:]) == 1:
		return 1
	return 0
t = int(input())
for _ in range(t):
	s = input()
	n = int(s)
	if round(s):
		print(1)
		print(s)
		continue
	l = len(s)
	v = []
	for i in range(l):
		if s[i] != '0':
			x = s[i] + '0' * (l - i - 1)
			v.append(x)
	print(len(v))
	for i in v:
		print(i, end=' ')
	print()


import math
t = int(input())
flag = 0
for i in range(t):
	n = int(input())
	l = []
	x = math.ceil(math.log10(n))
	y = math.floor(math.log10(n))
	if x == y:
		print(1)
		print(n)
	else:
		for j in range(x):
			r = int(n / math.pow(10, x - j - 1))
			l.append(int(r * math.pow(10, x - j - 1)))
			n = n - r * math.pow(10, x - j - 1)
		l.sort()
		l.reverse()
		if len(l) == 1:
			print(1)
			print(l[0])
		else:
			for k in range(len(l)):
				if l[k] == 0:
					del l[k:]
					break
			print(len(l))
			print(*l)


t = int(input())
for i in range(t):
	n = int(input())
	count = 0
	res = 0
	l = []
	while n > 0:
		x = n % 10
		if x * 10 ** count != 0:
			l.append(x * 10 ** count)
			res += 1
		count += 1
		n = n // 10
	print(res)
	print(*l, sep=' ')


n = int(input())
b = []
for i in range(n):
	x = list(input())
	a = []
	l = 0
	j = len(x) - 1
	while j >= 0:
		if x[j] != '0':
			a.append(int(x[j]) * 10 ** l)
			l = l + 1
		else:
			l = l + 1
		j = j - 1
	b.append(a)
for i in range(len(b)):
	print(len(b[i]))
	for j in range(len(b[i])):
		print(b[i][j], end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	ss = []
	k = 1
	cnt = 0
	while n > 0:
		d = n % 10
		if d != 0:
			ss.append(d * k)
			cnt += 1
		k *= 10
		n //= 10
	print(cnt)
	for i in ss:
		print(i, end=' ')
	print(' ')


for _ in ' ' * int(input()):
	z = []
	a = input()[::-1]
	for i in range(len(a)):
		if a[i] != '0':
			z += [a[i] + '0' * i]
	print(len(z))
	print(*z, sep=' ')


import sys
import math
from collections import defaultdict
mod = 1000000007
T = 1
T = int(sys.stdin.readline())
for _ in range(T):
	n = input()
	l = len(n)
	p = 10 ** (l - 1)
	ans = []
	for i in n:
		if i != '0':
			k = int(i)
			ans.append(k * p)
		p //= 10
	print(len(ans))
	print(*ans)


t = int(input())
while t:
	t -= 1
	n = int(input())
	c = 0
	x = n
	d = 1
	l = []
	while x != 0:
		x1 = x % 10
		if x1 == 0:
			d = d * 10
		else:
			c += 1
			x1 = int(x1 * d)
			l.append(x1)
			d = d * 10
		x = x // 10
	print(c)
	for i in range(len(l)):
		print(l[i], end=' ')


t = int(input())
for i in range(t):
	n = int(input())
	cnt = 0
	mul = 1
	nums = []
	while n > 0:
		curr = int(n % 10)
		if curr > 0:
			cnt += 1
			nums.append(curr * mul)
		n = n // 10
		mul *= 10
	print(cnt)
	for elem in nums:
		print(elem, end=' ')
	print('')


def summands(n):
	arr = []
	power = 1
	while n > 0:
		if int(n % 10) > 0:
			arr.append(int(n % 10) * power)
		n = int(n / 10)
		power = power * 10
	print(len(arr))
	print(' '.join((str(x) for x in arr)))

def main():
	test_case = int(input())
	while test_case != 0:
		n = int(input())
		summands(n)
		test_case = test_case - 1
main()


t = int(input())
for _ in range(t):
	n = int(input())
	a = []
	k = 0
	while n > 0:
		a.append(n % 10 * 10 ** k)
		n = n // 10
		k += 1
	while 0 in a:
		a.remove(0)
	print(len(a))
	print(*a)


def solve(num):
	out = []
	for (idx, dig) in enumerate(reversed(str(num))):
		out.append(int(dig) * 10 ** idx)
	out = [n for n in out if n != 0]
	return str(len(out)) + '\n' + ' '.join(map(str, out))
T = int(input())
for _ in range(T):
	num = int(input())
	print(solve(num))


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop
import math
from collections import *
from functools import reduce, cmp_to_key, lru_cache
import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
M = mod = 10 ** 9 + 7

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip().split()]

def st():
	return str(input().rstrip())[2:-1]

def val():
	return int(input().rstrip())

def li2():
	return [str(i)[2:-1] for i in input().rstrip().split()]

def li3():
	return [int(str(i)[2:-1]) for i in input().rstrip()]
for _ in range(val()):
	l = []
	n = val()
	mul = 1
	while n:
		if n % 10:
			l.append(n % 10 * mul)
		mul *= 10
		n //= 10
	print(len(l))
	print(*sorted(l)[::-1])


n = int(input())
for _ in range(n):
	m = input()
	M = int(m)
	L = len(m)
	ans = []
	for i in range(len(m)):
		p = m[i] + '0' * (L - i - 1)
		M -= int(p)
		ans.append(p)
		if M == 0:
			break
	final = []
	for i in ans:
		if int(i):
			final.append(i)
	print(len(final))
	print(' '.join(final))


test_cases = int(input())
for z in range(test_cases):
	n = int(input())
	output = []
	for i in range(1, len(str(n)) + 1):
		if n % 10 ** i != 0:
			output.append(n % 10 ** i)
			n = n - n % 10 ** i
	print(len(output))
	x = ''
	for i in output:
		x += str(i) + ' '
	print(x)


t = int(input())
for i in range(t):
	n = int(input())
	res = []
	i = 0
	while n:
		d = n % 10
		if d:
			res.append(d * 10 ** i)
		n //= 10
		i += 1
	print(len(res))
	print(' '.join(map(str, res)))


for _ in range(int(input())):
	n = int(input())
	count = 0
	count_zero = 0
	lst = []
	if 0 < n <= 9:
		count += 1
		lst.append(n)
	else:
		m = str(n)
		lst_n = [int(elem) for elem in m]
		if sum(lst_n) == 1 and list(set(lst_n[1:]))[0] == 0:
			count = 1
			lst.append(n)
		else:
			while n:
				rem = n % 10
				n = n // 10
				count += 1
				if rem != 0:
					lst.append(rem * pow(10, count - 1))
				else:
					count_zero += 1
			count = count - count_zero
	print(count)
	ans = ' '.join([str(elem) for elem in lst])
	print(ans)


import pdb
test_cases = int(input())
for tests in range(test_cases):
	counter = 0
	result = []
	temp = 1
	first_number = 0
	n = input()
	for xyz in range(0, len(n)):
		if n[xyz] != '0':
			counter += 1
	print(counter)
	for digit in range(len(n) - 1, -1, -1):
		if n[digit] != '0' and digit != 0:
			c = int(n[digit]) * temp
			print(c, end=' ')
		temp *= 10
	if digit == 0:
		first_number = int(int(n[0]) * temp / 10)
		print(first_number)


t = int(input())
for i in range(t):
	n = int(input())
	s1 = n
	list1 = []
	try:
		while s1 > 0:
			s1 = str(s1)
			len1 = len(s1)
			b = int(s1[0]) * 10 ** (len1 - 1)
			list1.append(b)
			s1 = int(s1[1:])
	except:
		pass
	print(len(list1))
	print(*list1)


t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 10:
		print(1)
		print(n)
	else:
		n = str(n)
		j = len(n) - 1
		l = 0
		l1 = []
		for i in n:
			if int(i) == 0:
				pass
			else:
				l1.append(i + '0' * j)
				l += 1
			j -= 1
		print(l)
		print(*l1)


for _ in range(int(input())):
	n = int(input())
	sn = str(n)
	nums = []
	i = 1
	while len(str(i)) < len(sn):
		if n % 10 != 0:
			nums.append(str(n % 10 * i))
		pn = str(n)
		n = int(pn[:len(pn) - 1])
		i *= 10
	nums.append(str(n * i))
	print(len(nums))
	print(' '.join(sorted(nums, reverse=True)))


for _ in range(int(input())):
	n = list(input())
	k = len(n) - 1
	c = 0
	u = ''
	for i in range(len(n)):
		s = int(n[i]) * pow(10, k)
		if s != 0:
			u = u + str(s) + ' '
			c += 1
		k -= 1
	print(c)
	print(u)


n = int(input())
for i in range(n):
	s = input()
	result = ''
	result_sum = 0
	p = 1
	for j in range(len(s)):
		if s[len(s) - 1 - j] != '0':
			result += str(int(s[len(s) - 1 - j]) * p) + ' '
			result_sum += 1
		p *= 10
	print(result_sum)
	print(result)


t = int(input())

def fun(a):
	s = []
	i = 0
	while a:
		k = a % 10
		a = int(a / 10)
		if k:
			s.append(k * 10 ** i)
		i += 1
	print(len(s))
	print(*s, sep=' ')
while t:
	t -= 1
	a = int(input())
	fun(a)


t = int(input())
for i in range(t):
	a = input()
	lst = []
	for i in range(len(a)):
		if int(a[i]) != 0:
			lst.append(int(a[i]) * 10 ** (len(a) - i - 1))
	print(len(lst))
	for i in lst:
		print(i, end=' ')
	print()


def get_pos_nums(num):
	pos_nums = []
	while num != 0:
		pos_nums.append(num % 10)
		num = num // 10
	return pos_nums
for i in range(int(input())):
	n = int(input())
	z = len(str(n))
	y = get_pos_nums(n)
	x = 1
	l2 = []
	for i in y:
		res = i * x
		if res != 0:
			l2.append(res)
		x = x * 10
	print(len(l2))
	print(*l2)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = []
	i = 1
	while n > 0:
		d = n % 10
		if d > 0:
			ans.append(d * i)
		n //= 10
		i *= 10
	print(len(ans))
	print(' '.join((str(j) for j in ans)))


t = int(input())
while t > 0:
	lista = []
	numero = input()
	pos = 0
	for unidad in numero:
		aux = ''
		if pos != len(numero) - 1 != numero[-1] and unidad != '0':
			for i in range(0, len(numero) - (pos + 1)):
				aux += '0'
			lista.append(unidad + aux)
		elif unidad != '0':
			lista.append(unidad)
		pos += 1
	t -= 1
	print(len(lista))
	cadena = ' '.join(lista)
	print(cadena)


num = int(input())
arr = []
for i in range(num):
	ele = int(input())
	arr.append(ele)
for n in arr:
	mult = 1
	count = 0
	arr = []
	while n > 0:
		ele = n % 10 * mult
		if ele != 0:
			arr.append(ele)
			count += 1
		mult *= 10
		n = n // 10
	print(count)
	listToStr = ' '.join([str(elem) for elem in arr])
	print(listToStr)


for i in range(int(input())):
	n = input()
	lst = []
	for j in range(len(n)):
		if n[j] == '0':
			continue
		lst.append(int(n[j]) * 10 ** (len(n) - j - 1))
	print(len(lst))
	print(' '.join([str(x) for x in lst]))


def r_func(num):
	ctr = 0
	L = []
	c = len(num) - 1
	for i in num:
		if i != '0':
			L.append(int(i) * 10 ** c)
			ctr += 1
		c = c - 1
	print(ctr)
	for i in L:
		print(i, end=' ')
	print()
n = int(input())
for i in range(n):
	num = input()
	r_func(num)


t = int(input())
arr = []
cnt = []
fin_arr = []
for i in range(t):
	arr.append(input())
	cnt.append(0)
	t_arr = []
	for j in range(len(arr[i])):
		if arr[i][j] != '0':
			cnt[i] += 1
			t_arr.append(arr[i][j].ljust(len(arr[i]) - j, '0'))
	fin_arr.append(t_arr)
for i in range(t):
	print(cnt[i])
	for j in fin_arr[i]:
		print(j, end=' ')
	print()


t = int(input())
for i in range(t):
	b = []
	a = list(map(int, input()))
	b = a[1:]
	if list(set(b)) == [0]:
		print(1)
		print(''.join(list(map(str, a))))
		continue
	elif len(a) == 1:
		print(1)
		print(''.join(list(map(str, a))))
		continue
	for i in range(0, len(a), 1):
		if a[i] != 0:
			a[i] = a[i] * 10 ** (len(a) - 1 - i)
	a = [i for i in a if i != 0]
	print(len(a))
	for i in a:
		print(i, end=' ')
	print()
	continue


for i in range(int(input())):
	n = input()
	l = list(n)
	c = 0
	for i in range(len(l)):
		if int(l[i]) != 0:
			c += 1
	print(c)
	for i in range(len(l)):
		if int(l[i]) != 0:
			print(l[i] + '0' * (len(l) - i - 1), end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	k = 0
	tmp = ''
	length = 0
	while n > 0:
		if n % 10 != 0:
			tmp = str(n % 10 * pow(10, length)) + ' ' + tmp
			k += 1
		n = n // 10
		length += 1
	print(k)
	print(tmp)


for _ in range(int(input())):
	n = list(input())
	res = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		else:
			s = n[i] + (len(n) - i - 1) * '0'
			res.append(s)
	print(len(res))
	print(*res)


import atexit
import io
import sys
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())

def num():
	return int(input())

def line():
	return map(int, input().split())
from itertools import repeat
t = num()
for _ in repeat(None, t):
	n = input()
	l = len(n)
	q = [c + '0' * (l - i - 1) for (i, c) in enumerate(n) if int(c)]
	print(len(q))
	print(' '.join(q))


t = int(input())
for u in range(t):
	n = list(input())
	res = ''
	c = 0
	for i in range(len(n)):
		if n[i] != '0':
			res += n[i] + '0' * (len(n) - (i + 1))
			res += ' '
			c += 1
	print(c)
	print(res)


t = int(input())
for i in range(t):
	n = int(input())
	d = {}
	l = [10000, 1000, 100, 10, 1]
	for i in l:
		if n - n % i > 0:
			d[i] = n - n % i
			n = n - n // i * i
	print(len(d.keys()))
	for j in d.keys():
		print(d[j], end=' ')
	print('')


t = int(input())
ans = []
for _ in range(t):
	n = list(input())
	n.reverse()
	a = []
	for i in range(len(n)):
		if n[i] != '0':
			a.append(str(int(n[i]) * 10 ** i))
	print(len(a))
	print(' '.join(a))


for i in range(int(input())):
	s = str(input())
	i = 0
	n = len(s) - 1
	l = []
	while i < len(s):
		temp = s[i] + '0' * n
		temp = int(temp)
		if temp != 0:
			l.append(temp)
		n = n - 1
		i = i + 1
	print(len(l))
	print(*l)


t = int(input())
for x in range(0, t):
	n = int(input())
	a = []
	c = 1
	t = n
	while t > 0:
		d = t % 10
		t = t // 10
		if d == 0:
			pass
		else:
			a.append(str(d) + '0' * (c - 1))
		c += 1
	print(len(a))
	for x in range(0, len(a)):
		print(a[x], end=' ')
	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)


t = int(input())
for i in range(t):
	n = list(input())
	a = []
	b = []
	c = []
	for i in range(len(n)):
		if n[i] != 0:
			a.append(str(n[i]) + '0' * abs(len(n) - (i + 1)))
	for i in range(len(a)):
		b.append(set(a[i]))
	for i in range(len(b) - 1):
		if len(b[i]) > 1:
			c.append(a[i])
	if int(a[-1]) != 0:
		c.append(a[-1])
	print(len(c))
	print(*c)


n = int(input())
for i in range(n):
	a = 0
	num = int(input())
	lista = [0, 0, 0, 0, 0]
	lista[0] = num % 10
	if lista[0] != 0:
		a += 1
	lista[1] = num // 10 % 10 * 10
	if lista[1] != 0:
		a += 1
	lista[2] = num // 100 % 10 * 100
	if lista[2] != 0:
		a += 1
	lista[3] = num // 1000 % 10 * 1000
	if lista[3] != 0:
		a += 1
	lista[4] = num // 10000 % 10 * 10000
	if lista[4] != 0:
		a += 1
	print(a)
	for j in lista:
		if j != 0:
			print(j, end=' ')


import sys
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
for tt in range(int(input())):
	s = input()
	ans = []
	cnt = 0
	for i in range(len(s) - 1, -1, -1):
		if s[i] != '0':
			ans.append(s[i] + '0' * cnt)
		cnt += 1
	print(len(ans))
	print(*ans, sep=' ')


t = int(input())
while t:
	num = int(input())
	sol = []
	count = 0
	while num:
		temp = num % 10
		if temp != 0:
			count += 1
		num //= 10
		sol.append(temp)
	print(count)
	size = len(sol)
	for i in range(size):
		if sol[i] != 0 and i != size - 1:
			print(sol[i] * 10 ** i, end=' ')
		elif sol[i] != 0 and i == size - 1:
			print(sol[i] * 10 ** i)
		else:
			pass
	t -= 1


from sys import stdin
input = lambda : stdin.readline()
ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(map(int, input().split()))
for _ in range(ii()):
	s = input()
	cnt = len(s) - 2
	l = []
	for i in s:
		if i != '0':
			l.append(i + '0' * cnt)
		cnt -= 1
	print(len(l) - 1)
	print(*l, end='')


t = input()
t = int(t)
shetchikshetchikov = 0
shetchik123 = 0
ff = []
while shetchikshetchikov < t:
	stroka = input()
	shetchik123 = 0
	ff = []
	while shetchik123 < len(stroka):
		a = ''
		if stroka[shetchik123] != '0':
			a = a + stroka[shetchik123]
			a = a + '0' * (len(stroka) - (shetchik123 + 1))
			ff.append(a)
		shetchik123 = shetchik123 + 1
	shetchikshetchikov = shetchikshetchikov + 1
	print(len(ff))
	print(*ff)


test = int(input())
for i in range(test):
	n = input()
	if len(n) == 1:
		print(1)
		print(n)
		continue
	lft = n[0]
	rgt = n[1:]
	if int(rgt) == 0:
		print(1)
		print(n)
	else:
		cnt = 0
		l = []
		for i in range(len(n)):
			if n[i] == '0':
				continue
			s = n[i] + '0' * (len(n[i:]) - 1)
			l.append(s)
		print(len(l))
		for i in l:
			print(i, end=' ')
		print()


for i in range(int(input())):
	a = input()
	z = len(a) - 1
	r = 0
	l = []
	for j in a:
		if j != '0':
			r += 1
			l.append(j + '0' * z)
		z -= 1
	print(r)
	for j in l:
		print(j, end=' ')
	print()


numcases = int(input())
for i in range(numcases):
	count = 0
	s = input()[::-1]
	ans = []
	for j in range(len(s)):
		if s[j] != '0':
			count += 1
			ans.append(s[j] + '0' * j)
	print(count)
	print(*ans)


def solve(k, i):
	if k == 0:
		return
	y = k % 10
	if y != 0:
		arr.append(y * i)
	i *= 10
	solve(k // 10, i)
for t in range(int(input())):
	n = int(input())
	arr = []
	solve(n, 1)
	arr = arr[::-1]
	print(len(arr))
	print(*arr)


def countDigit(n):
	count = 0
	while n != 0:
		n //= 10
		count += 1
	return count
t = int(input())
for t in range(0, t):
	q = list(map(int, input().rstrip().split()))
	z = []
	n = q[0]
	k = 0
	a = n
	j = 0
	sum = 0
	step = 0
	d = 0
	k = countDigit(n) - 1
	while k >= 0:
		r = a % 10
		if r != 0:
			d = r * 10 ** j
			z.append(d)
			step = step + 1
		j = j + 1
		k = k - 1
		a //= 10
		if sum == n:
			break
	print(step)
	for i in range(0, step):
		print(z[i], end=' ')
	print('')


t = int(input())
for _ in range(t):
	s = input()
	n = len(s)
	l = list(s)
	z = int(s)
	c = 0
	y = n - 1
	l.reverse()
	m = []
	for i in range(n):
		if l[-1] == '0':
			y -= 1
			l.pop()
			continue
		else:
			m.append(int(l[-1]) * 10 ** y)
			l.pop()
			y -= 1
			c += 1
	print(c)
	print(*m)


t = int(input())
for _ in range(t):
	n = int(input())
	c = 0
	x = '1'
	ans = []
	while n > 0:
		r = n % 10
		y = r * int(x)
		if y != 0:
			ans.append(y)
			c += 1
		x += '0'
		n = n // 10
	print(c)
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	length = 0
	n = input()
	n = list(n)
	ans_arr = []
	for i in range(len(n)):
		if n[i] != 0:
			ans_arr.append(int(n[i]) * 10 ** (len(n) - i - 1))
	print(len(ans_arr) - ans_arr.count(0))
	for element in ans_arr:
		if element != 0:
			print(element, end=' ')
	print('')


def gogo(n):
	res = ''
	count = 0
	for i in range(len(n)):
		if n[i] != '0':
			count += 1
			zeroes = '0' * (len(n) - (i + 1))
			res += n[i] + zeroes + ' '
	return (count, res.strip())

def main():
	t = int(input())
	for i in range(t):
		n = input()
		(count, s) = gogo(n)
		print(count)
		print(s)
main()


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


def solution(n: int):
	arr = []
	i = 0
	copy_n = n
	k = n
	len_1 = 0
	while copy_n != 0:
		copy_n //= 10
		len_1 += 1
	mul = 0
	while i < len_1:
		if n % 10 != 0:
			arr.append(n % 10 * 10 ** mul)
		n //= 10
		mul += 1
		i += 1
	return arr
t = int(input())
a = []
ans = []
ans_1 = []
for i in range(t):
	c = int(input())
	a.append(c)
	ans.append(solution(a[i]))
for i in range(len(a)):
	print(len(ans[i]))
	print(*ans[i])


for ii in range(int(input())):
	n = input()
	tens = len(n) - 1
	arr = []
	for i in n:
		arr.append(int(i) * pow(10, tens))
		tens -= 1
	k = len(arr)
	newarr = []
	for i in arr:
		if i == 0:
			k -= 1
			continue
		else:
			newarr.append(i)
	print(k)
	print(*newarr)


Ntc = int(input())
for _ in range(Ntc):
	tc = input()
	curpos = len(tc) - 1
	ans = []
	for char in tc:
		if char != '0':
			ans.append(int(char) * 10 ** curpos)
		curpos -= 1
	print(len(ans))
	print(' '.join(map(str, ans)))


for _ in range(int(input())):
	n = int(input())
	ans = []
	while n:
		if len(str(n)) == 1:
			ans.append(n)
			break
		l = len(str(n))
		temp = n // 10 ** (l - 1) * 10 ** (l - 1)
		ans.append(temp)
		n -= temp
	print(len(ans))
	print(*ans)


num_test_cases = int(input())
for _ in range(num_test_cases):
	num = input()
	arr = []
	for i in range(len(num)):
		if int(num[i]) * 10 ** (len(num) - i - 1) == 0:
			continue
		if i != '0':
			arr.append(str(int(num[i]) * 10 ** (len(num) - i - 1)))
	print(len(arr))
	print(' '.join(arr))


t = int(input())
for _ in range(t):
	n = input()
	count = 0
	for i in n:
		if i != '0':
			count += 1
	print(count)
	n = n[::-1]
	pos = 0
	for i in n:
		if i != '0':
			k = int(i)
			print(k * 10 ** pos, end=' ')
		pos += 1
	print('\n')


for x in range(int(input())):
	n = input()
	if int(n) % pow(10, len(n) - 1) == 0 or len(n) == 1:
		print('1')
		print(n)
	else:
		i = int(n)
		j = 0
		lst = list()
		while i > 0:
			c = i % 10
			v = pow(10, j)
			i = i // 10
			if c != 0:
				lst.append(v * c)
			j += 1
		print(len(lst))
		print(*lst)


def rounded(t):
	n = int(t)
	f = []
	while n > 9:
		a = n % 10
		n = int(n / 10)
		f.append(a)
	f.append(n)
	p = len(f)
	for j in range(0, len(f)):
		if f[j] == 0:
			p -= 1
	print(p)
	u = []
	for i in range(0, len(f)):
		y = f[i] * 10 ** i
		if y != 0:
			u.append(y)
	for i in range(0, len(u)):
		print(u[i], end=' ')
t = int(input())
for i in range(0, t):
	j = input()
	rounded(j)


n = int(input())
for i in range(n):
	num = input()
	tall = len(num)
	ans = []
	for j in range(len(num)):
		if num[j] != '0':
			ans.append(int(num[j]) * 10 ** (tall - j - 1))
	print(len(ans))
	print(*ans)


tc = int(input())
for tc in range(tc):
	n = input()
	l = len(n)
	s = 0
	res = ''
	for i in range(l):
		if not int(n[i]) == 0:
			s += 1
			res += n[i] + '0' * (l - 1 - i) + ' '
	print(s)
	print(res)


t = int(input())
for _ in range(t):
	n = int(input())
	count = 0
	count_total = 0
	temp = n
	while temp > 0:
		if temp % 10 != 0:
			count += 1
		count_total += 1
		temp = temp // 10
	i = 0
	print(count)
	while n > 0:
		if n % 10 != 0:
			temp = 10 ** i
			print(n % 10 * temp, end=' ')
		n = n // 10
		i += 1
	print('')


t = int(input())
for i in range(t):
	n = int(input())
	c = 0
	cp = n
	while n:
		if n % 10:
			c = c + 1
		n = n // 10
	print(c)
	i = 1
	while cp:
		if cp % 10:
			print(i * (cp % 10), end=' ')
		cp = cp // 10
		i = i * 10


T = int(input())
for t in range(T):
	n = list(map(int, input()))
	k = len(n)
	s = 0
	for i in range(k):
		if n[i] > 0:
			s += 1
	print(s)
	for i in range(k):
		if n[i] > 0:
			print(n[i] * 10 ** (k - i - 1), end=' ')
	print()


cases = int(input())
for i in range(cases):
	num = int(input())
	start = 10
	count = 0
	l = []
	while num != 0:
		q = num % start
		num -= q
		if q != 0:
			l.append(q)
			count += 1
		start *= 10
	print(count)
	for ele in l:
		print(ele, end=' ')


for _ in range(int(input())):
	n = int(input())
	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 = str(input())
	k = 0
	ans = []
	for i in range(len(s)):
		if s[i] != '0':
			k += 1
			ans.append(s[i] + '0' * (len(s) - i - 1))
	print(k)
	for i in ans:
		print(int(i), end=' ')
	print()


t = int(input())
for i in range(t):
	num = int(input())
	print(len(str(num)) - str(num).count('0'))
	counter = 0
	while num > 0:
		ost = num % 10
		if ost != 0:
			print(ost * 10 ** counter, end=' ')
		counter += 1
		num //= 10
	print()


t = int(input())
q = 0
d = 0
for _ in range(t):
	n = input()
	d = len(n) - 1
	for i in range(d + 1):
		if n[i] != '0':
			q += 1
	print(q)
	q = 0
	for x in range(d + 1):
		if n[x] != '0':
			print(int(n[x]) * 10 ** d, end=' ')
		d -= 1
	print()
	d = 0


for i in range(int(input())):
	result = []
	n = input()
	if 1 <= int(n) <= 9:
		print(1)
		print(n)
	elif int(n[1:]) == 0:
		print(1)
		print(n)
	else:
		for c in range(len(n)):
			if n[c] != '0':
				result.append(str(int(n[c]) * 10 ** (len(n) - c - 1)))
		print(len(result))
		print(' '.join(result))


t = int(input())
for _ in range(t):
	n = int(input())
	prev = n
	li = [10000, 1000, 100, 10][::-1]
	arr = set([])
	for mod in li:
		if n % mod != 0:
			arr.add(n % mod)
		n = n - n % mod
	if prev == n:
		arr.add(prev)
	print(len(arr))
	print(' '.join((str(num) for num in arr)))


import sys
import math
from collections import deque
input = sys.stdin.buffer.readline
for _ in range(int(input())):
	n = int(input())
	ar = []
	po = 1
	while n > 0:
		if n % 10 > 0:
			ar.append(n % 10 * po)
		po *= 10
		n = n // 10
	print(len(ar))
	for i in ar:
		print(i, end=' ')
	print()


def solve(n):
	ans = []
	i = 0
	while n > 0:
		dig = n % 10
		if dig != 0:
			ans.append(dig * 10 ** i)
		i += 1
		n //= 10
	print(len(ans))
	for a in ans:
		print(a, end=' ')
	print()
try:
	for _ in range(int(input())):
		n = int(input())
		solve(n)
except Exception as e:
	print(e)
	pass


from math import gcd, ceil
from collections import defaultdict as dd

def lcm(a, b):
	return a * b // gcd(a, b)

def inin():
	return int(input())

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

def ar(element, size):
	return [element for i in range(size)]

def digitsum(num):
	su = 0
	while num:
		su += num % 10
		num //= 10
	return su
for i in range(inin()):
	n = inin()
	stri = ''
	tens = 0
	ans = 0
	while n:
		if n % 10 == 0:
			tens += 1
		else:
			stri += str(n % 10 * 10 ** tens)
			ans += 1
			stri += ' '
			tens += 1
		n //= 10
	print(ans)
	print(stri)


for _ in range(int(input())):
	n = input()
	i = 0
	c = 0
	a = []
	while i < len(n):
		if len(n) == 1:
			break
		if i != 0:
			if n[i] != '0':
				c = c + 1
				if c < 2:
					a.append(int(n[0] + len(n[1:]) * '0'))
				a.append(int(n[i] + len(n[i + 1:]) * '0'))
		i = i + 1
	if c > 0:
		print(c + 1)
		print(*a)
	else:
		print(1)
		print(int(n))


t = int(input())
for j in range(t):
	n = int(input())
	pw = [4, 3, 2, 1, 0]
	answr = []
	amount = 0
	for k in pw:
		for i in range(9, 0, -1):
			if n - i * 10 ** k >= 0:
				n -= i * 10 ** k
				amount = amount + 1
				answr.append(i * 10 ** k)
	print(amount)
	for i in answr:
		print(i, end=' ')
	print()


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

def Z():
	return int(input())
t = Z()
for _ in range(t):
	n = Z()
	s = str(n)
	ans = []
	for i in range(len(s)):
		if s[i] != '0':
			ans.append(10 ** (len(s) - 1 - i) * (ord(s[i]) - ord('0')))
	print(len(ans))
	print(*ans)


for _ in range(int(input())):
	l = list(input())
	n = len(l)
	if n == 1:
		print(1)
		print(l[0])
	else:
		x = l.count('0')
		l1 = []
		print(n - x)
		for i in range(n):
			if l[i] != '0':
				l1 += [int(l[i]) * 10 ** (n - i - 1)]
		print(*l1)


n = int(input())
for i in range(n):
	num = str(input())
	rev = reversed(num)
	mult = 1
	ans = []
	for j in reversed(num):
		if j != '0':
			ans.append(int(j) * mult)
		mult *= 10
	print(len(ans))
	print(' '.join([str(x) for x in ans]))


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	out = []
	strn = str(n)[::-1]
	for i in range(len(strn)):
		char = strn[i]
		if char != '0':
			out.append(int(char) * 10 ** i)
	print(len(out))
	print(' '.join([str(x) for x in out]))


t = int(input())
for i in range(t):
	count = 0
	new = 0
	a = []
	n = int(input())
	for k in range(len(str(n)), 0, -1):
		new = n % pow(10, k) - n % pow(10, k - 1)
		if new != 0:
			a.append(new)
			count += 1
	print(count)
	m = ' '.join(map(str, a))
	print(m)


num = []
for _ in range(int(input())):
	num.append(input())
for t in num:
	k = len(t)
	count = 0
	index = []
	rounds = []
	for (i, j) in enumerate(t):
		if j != '0':
			count += 1
			rounds.append(j)
			index.append(k - i - 1)
	print(count)
	for i in range(len(rounds)):
		print(int(rounds[i]) * 10 ** index[i], end=' ')
	print()


t = int(input())
results = []
for i in range(t):
	n = input()
	m = len(n)
	res = []
	digits = 0
	for j in range(m - 1, -1, -1):
		if n[j] != '0':
			tmp = '0' * digits
			res.append(n[j] + tmp)
		digits += 1
	results.append(res)
for r in results:
	print(len(r))
	print(' '.join(r))


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = []
	d = rem = 0
	if n >= 1000:
		rem = n % 1000
		a.append(n - rem)
		n = n % 1000
	if n >= 100:
		rem = n % 100
		a.append(n - rem)
		n = n % 100
	if n >= 10:
		rem = n % 10
		a.append(n - rem)
		n = n % 10
	if n > 0 and n < 10:
		a.append(n)
	print(len(a))
	print(*a)


q = int(input())
for _ in range(q):
	t = input()
	if len(t) == 1:
		print(1)
		print(t)
	else:
		temp = 0
		for i in range(1, len(t)):
			if t[i] == '0':
				pass
			else:
				temp = 1
				break
		if temp == 0:
			print(1)
			print(t)
		else:
			num = 0
			l = len(t) - 1
			ans = []
			c = 0
			for i in t:
				num = int(i)
				if num != 0:
					num *= 10 ** l
					c += 1
					ans.append(num)
				l -= 1
			print(c)
			for i in ans:
				print(i, end=' ')
			print()


def func(n):
	for i in range(n):
		k = int(input())
		l = []
		i = 1
		while k > 0:
			if k % 10 > 0:
				l.insert(0, k % 10 * i)
			k //= 10
			i *= 10
		print(len(l))
		print(*l)
n = int(input())
func(n)


t = int(input())
for i in range(t):
	n = input()
	l = len(n) - 1
	main = []
	for j in n:
		if j != '0':
			a = 10 ** l
			j = int(j)
			res = j * a
			main.append(res)
			l -= 1
		else:
			l -= 1
	print(len(main))
	for k in main:
		print(k, end=' ')
	print(end='\n')


t = int(input())
for q in range(t):
	num = input()
	tamanho = len(num)
	result = []
	for i in num:
		result.append(int(i) * 10 ** (tamanho - 1))
		tamanho = tamanho - 1
	while 0 in result:
		del result[result.index(0)]
	print(len(result))
	for a in range(len(result)):
		if a + 1 != len(result):
			print(result[a], end=' ')
		else:
			print(result[a])


t = int(input())
for i in range(t):
	c = 0
	n = input()
	for s in n:
		if s != '0':
			c += 1
	print(c)
	for s in n:
		if s != '0':
			v = n.index(s)
			r = int(s) * 10 ** (len(n) - (v + 1))
			print(r, end=' ')
			n = str(int(n) - r)
	print('')


t = int(input())
while t > 0:
	n = input()
	x = n[1:len(n)]
	f = 10 ** (len(n) - 1)
	d = str(f)
	if x == d[1:len(d)]:
		print(1)
		print(n)
	else:
		c = 0
		w = ''
		for i in range(0, len(n), 1):
			if n[i] != '0':
				k = 10 ** (len(n) - i - 1)
				v = str(k)
				w = w + n[i] + v[1:len(v)] + ' '
				c = c + 1
		print(c)
		print(w)
	t = t - 1


from sys import stdin, stdout, setrecursionlimit
for _ in range(int(input())):
	x = input()
	a = []
	for i in range(len(x) - 1, -1, -1):
		if x[i] != '0':
			a.append(x[i] + '0' * (len(x) - 1 - i))
	print(len(a))
	print(*a)


for _ in range(int(input())):
	s = input()
	n = len(s)
	ans = ''
	k = 0
	for j in range(n):
		if s[j] != '0':
			k += 1
			ans += s[j] + '0' * (n - j - 1) + ' '
	print(k)
	print(ans)


t = input()
t = int(t)
while t != 0:
	n = input()
	n = int(n)
	temp = n
	nod = 0
	no = 0
	a = [0, 0, 0, 0, 0]
	while temp != 0:
		a[nod] = int(temp % 10)
		temp = int(temp / 10)
		nod += 1
	for i in range(nod):
		if a[i] != 0:
			no += 1
	print(no)
	for i in range(nod):
		if a[i] != 0:
			print(int(a[i] * 10 ** i), end=' ')
	print('\n')
	t += -1


import math
for w in range(int(input())):
	a = list(input())
	lista = []
	for i in range(len(a)):
		if a[i] != '0':
			lista.append(a[i] + '0' * (len(a) - (i + 1)))
	print(len(lista))
	print(' '.join(lista))


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, str(n)))
	length = len(l)
	k = 0
	for i in l:
		if i != 0:
			k += 1
	print(k)
	c = 0
	for i in l:
		if i != 0:
			print(i * 10 ** (length - c - 1), end=' ')
		c += 1
	print('\n')


import math as mt
import sys, string
from collections import Counter, defaultdict
input = sys.stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
ARR = lambda : list(map(int, input().split()))

def main():
	ip = input()
	n = len(ip) - 1
	ans = []
	for i in range(n):
		if ip[i] != '0':
			tmp = ip[i]
			for _ in range(n - i - 1):
				tmp += '0'
			ans.append(tmp)
	print(len(ans))
	for e in ans:
		print(e, end=' ')
	print()
for _ in range(I()):
	main()


for i in range(int(input())):
	num = input()
	times = 0
	prstr = ''
	for j in range(len(num)):
		if num[j] != '0':
			prstr += num[j]
			prstr += '0' * (len(num) - j - 1) + ' '
			times += 1
	print(times)
	print(prstr)


t = int(input())
while t != 0:
	k = input()
	n = int(k)
	v = []
	for i in range(len(k)):
		x = n % 10
		n = n / 10
		n = int(n)
		p = 10 ** i
		x = x * p
		if x != 0:
			v.append(x)
	print(len(v))
	print(*v)
	t = t - 1


t = int(input())
for number in range(t):
	n = input()
	result = []
	power = 0
	for i in n[-1::-1]:
		if i != '0':
			result.append(int(i) * 10 ** power)
		power += 1
	print(len(result))
	print(*result)


for i in range(int(input())):
	n = int(input())
	arr = []
	c = len(str(n)) - 1
	while n:
		if n // 10 ** c:
			arr.append(n // 10 ** c * 10 ** c)
		n %= 10 ** c
		c -= 1
	print(len(arr))
	print(*arr)


n = int(input())
for i in range(n):
	a = input()
	x = len(a)
	if int(a) < 11 or x - 1 == a[1:].count('0'):
		print(1)
		print(a)
	else:
		a = int(a)
		t = a
		q = []
		for i in range(x):
			if a % 10 != 0:
				r = a % 10
				q.append(r * 10 ** i)
				a = a // 10
			else:
				a = a // 10
		s = t - sum(q)
		if s > 0:
			print(s, end=' ')
			t = 1
		else:
			t = 0
		print(len(q) + t)
		print(*q)


def dev(num):
	l = [10000, 1000, 100, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
	arr = []
	for d in l:
		a = num // d
		if a > 0:
			b = d * (num // d)
			arr.append(b)
			num %= d
	return arr
n = int(input())
for _ in range(n):
	num = int(input())
	arr = dev(num)
	print(len(arr))
	print(*arr)


t = int(input())
for _ in range(0, t):
	n = int(input())
	A = list()
	while n != 0:
		r = n % 10
		A.append(r)
		n = n // 10
	x = A.count(0)
	print(len(A) - x)
	for i in range(0, len(A)):
		if A[i] == 0:
			continue
		else:
			print(A[i] * pow(10, i), end=' ')
	print()


t = int(input())
while t:
	t -= 1
	n = list(input())
	x = len(n)
	li = []
	for i in range(x):
		if n[i] == '0':
			continue
		li.append(n[i] + '0' * (x - i - 1))
	print(len(li))
	print(*li)


t = int(input())
for i in range(t):
	s = ''
	p = input()
	k = len(p) - 1
	for j in range(len(p)):
		if p[j] == '0':
			k -= 1
		elif j < len(p):
			s += p[j]
			s += '0' * k
			k -= 1
		s += ' '
	n = list(s.split())
	print(len(n))
	print(s)


t = int(input())
for _ in range(t):
	pow = 1
	n = int(input())
	ret = []
	while n > 0:
		curr = n % 10
		if curr > 0:
			ret.append(curr * pow)
		pow *= 10
		n //= 10
	print(len(ret))
	print(' '.join(map(str, ret)))


def solve(A):
	l = []
	temp = 1
	while A != 0:
		if A % 10 != 0:
			l.append(temp * (A % 10))
		temp *= 10
		A = A // 10
	print(len(l))
	for i in l:
		print(i, end=' ')
	print()
for t in range(int(input())):
	n = int(input())
	solve(n)


t = int(input())
for i in range(t):
	n = int(input())
	a = [0, 0, 0, 0, 0]
	j = 0
	c = 0
	num = n
	while n != 0 and j < len(a):
		a[len(a) - j - 1] = n % 10
		j += 1
		n //= 10
	jed = 0
	dz = 0
	setek = 0
	tys = 0
	dztys = 0
	if a[len(a) - 1] != 0:
		jed = a[len(a) - 1]
	if a[len(a) - 2] != 0:
		dz = a[len(a) - 2]
		dz *= 10
	if a[len(a) - 3] != 0:
		setek = a[len(a) - 3]
		setek *= 100
	if a[len(a) - 4] != 0:
		tys = a[len(a) - 4]
		tys *= 1000
	if a[len(a) - 5] != 0:
		dztys = a[len(a) - 5]
		dztys *= 10000
	for x in range(len(a)):
		if a[x] != 0:
			c += 1
	print(c)
	if 1000 <= num <= 10000:
		if dztys != 0:
			print(dztys, end=' ')
		if tys != 0:
			print(tys, end=' ')
		if setek != 0:
			print(setek, end=' ')
		if dz != 0:
			print(dz, end=' ')
		if jed != 0:
			print(jed, end=' ')
		print()
	elif 100 <= num < 1000:
		if setek != 0:
			print(setek, end=' ')
		if dz != 0:
			print(dz, end=' ')
		if jed != 0:
			print(jed, end=' ')
		print()
	elif 10 <= num < 100:
		if dz != 0:
			print(dz, end=' ')
		if jed != 0:
			print(jed, end=' ')
		print()
	else:
		print(jed)


def solve(n):
	result = []
	n = str(n)
	length = len(n) - 1
	for (i, digit) in enumerate(n):
		if digit != '0':
			result.append(digit + '0' * (length - i))
	return result
for i in range(int(input())):
	result = solve(int(input()))
	print(len(result))
	print(' '.join(map(str, result)))


def pr(n, k, c):
	if n != 0:
		b = n % 10
		if b != 0:
			c += 1
		pr(n // 10, k + 1, c)
		if b != 0:
			print(b * 10 ** k, end=' ')
	else:
		print(c)
t = int(input())
for g in range(t):
	n = int(input())
	pr(n, 0, 0)


cases = int(input())
for _ in range(cases):
	n = input()
	tam = len(n)
	v = []
	for i in range(tam):
		aux = tam - i - 1
		ans = ''
		if n[i] != '0':
			ans += n[i]
			for j in range(aux):
				ans += '0'
			v.append(ans)
	print(len(v))
	for i in range(len(v)):
		print(v[i], end=' ')
	print()


for i in range(int(input())):
	n = input()
	l = []
	count = 0
	for i in range(len(n), 0, -1):
		if n[i - 1] != '0':
			l.append(n[i - 1] + '0' * (len(n) - i))
			count += 1
	print(count)
	print(' '.join(l))


t = int(input())
while t > 0:
	n = int(input())
	if not n % 10 ** (len(str(n)) - 1):
		print(1)
		print(n)
	else:
		S = str(n)
		L = [str(int(S[i]) * 10 ** (len(S) - (i + 1))) for i in range(len(S))]
		while '0' in L:
			L.remove('0')
		print(len(L))
		print(' '.join(L))
	t -= 1


n = int(input())
for i in range(n):
	a = int(input())
	b = []
	for i in range(len(str(a))):
		if str(a)[i] != '0':
			b.append(str(a)[i] + str(str(0) * (len(str(a)) - i - 1)))
	print(len(b))
	print(*b)


n = int(input())
for i in range(n):
	m = input()
	l = [int(x) for x in m]
	a = []
	for i in range(len(l)):
		if l[i] == 0:
			continue
		else:
			a.append(str(l[i]) + '0' * (len(l) - i - 1))
	print(len(a))
	print(' '.join(a))


nb_cases = int(input())
for n in range(nb_cases):
	k = input()
	k = '0' * (5 - len(k)) + k
	print(5 - k.count('0'))
	for pos in range(len(k)):
		if k[pos] == '0':
			continue
		else:
			print(int(k[pos]) * 10 ** (4 - pos), end=' ')
	print('')


def main():
	n = input()
	line = ''
	k = 0
	for i in range(0, len(n)):
		if n[i] != '0':
			k += 1
			line += n[i] + '0' * (len(n) - i - 1) + ' '
	print(k)
	print(line)
t = int(input())
for i in range(t):
	main()


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in str(n)]
	b = []
	count = 0
	for i in range(len(a)):
		if a[i] == 0:
			pass
		else:
			b.append(str(a[i]) + (len(str(n)) - 1 - i) * '0')
			count = count + 1
	print(count)
	for i in range(len(b)):
		print(int(b[i]), end=' ')
	print('')


tc = []
t = int(input())
for t in range(t):
	tc.append(input())
for x in tc:
	i = len(x) - 1
	v = []
	while i >= 0:
		if x[i] != '0':
			v.append(x[i] + '0' * (len(x) - 1 - i))
		i -= 1
	print(len(v))
	print(' '.join(v))


for _ in range(int(input())):
	s = list(input())
	l = len(s) - 1
	ar = []
	count = 0
	ans = []
	for i in s:
		if i != '0':
			count += 1
	print(count)
	for i in range(len(s)):
		if int(s[i]) > 0:
			ans.append(s[i] + '0' * (l - i))
	print(*ans)


n = input()
output = ''
for i in range(int(n)):
	num = input()
	if 0 <= int(num) <= 9:
		print(1)
		print(str(num))
	else:
		str_num = str(num)
		for j in range(len(str_num)):
			if str_num[j] != '0':
				output += str(int(str_num[j]) * 10 ** (len(str_num) - 1 - j)) + ' '
		print(len(output.split()))
		print(output)
		output = ''


t = int(input())
for i in range(t):
	n = input()
	j = len(n) - 1
	a = []
	p = 0
	while j >= 0:
		if n[j] == '0':
			pass
		else:
			a.append(int(n[j]) * 10 ** p)
		j += -1
		p += 1
	print(len(a))
	print(*a)


t = int(input())
for i in range(t):
	l = []
	n = int(input())
	if n in [1, 2, 3, 4, 5, 6, 7, 8, 9]:
		print(1)
		print(n)
	elif int(str(n)[1:]) == 0:
		print(1)
		print(n)
	else:
		for j in range(len(str(n))):
			a = str(n)[j] + '0' * (len(str(n)) - 1 - j)
			if int(a) == 0:
				pass
			else:
				l.append(int(a))
		print(len(l))
		print(*l)


n = int(input())
for _ in range(n):
	a = int(input())
	f = []
	count = 0
	while a > 0:
		t = a % 10
		if t == 0:
			pass
		else:
			f.append(str(t * 10 ** count))
		count += 1
		a = a // 10
	print(len(f))
	print(' '.join(f))


n = int(input())
for j in range(n):
	k = input()
	print(sum([el != '0' for el in k]))
	print(' '.join([k[i] + '0' * (len(k) - 1 - i) for i in range(len(k)) if str(k)[i] != '0']))


l = int(input())
for _ in range(l):
	x = input()
	sums = 0
	sumsl = []
	multi = 1
	if x[1:] == '0' * (len(x) - 1) or len(x) == 1:
		print(1)
		print(x)
	else:
		for i in reversed(range(len(x))):
			if not x[i] == '0':
				sums += 1
				sumsl.append(str(int(x[i]) * multi))
			multi *= 10
		print(sums)
		print(' '.join(sumsl))


t = int(input())
for i in range(t):
	cont = 0
	n = int(input())
	milhar = int(n / 1000) * 1000
	if milhar > 0:
		cont += 1
	n -= milhar
	centena = int(n / 100) * 100
	n -= centena
	if centena > 0:
		cont += 1
	dezena = int(n / 10) * 10
	if dezena > 0:
		cont += 1
	n -= dezena
	if n > 0:
		cont += 1
	print(cont)
	if milhar > 0:
		print(milhar, end=' ')
	if centena > 0:
		print(centena, end=' ')
	if dezena > 0:
		print(dezena, end=' ')
	if n > 0:
		print(n, end=' ')
	print()


for _ in range(int(input())):
	power = 1
	ans = []
	num = int(input())
	while num:
		temp = num % 10
		if temp != 0:
			ans.append(temp * power)
		num //= 10
		power *= 10
	print(len(ans))
	print(*ans)


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


for tc in range(int(input())):
	n = input()
	out = []
	for (i, char) in enumerate(reversed(n)):
		if char == '0':
			continue
		out.append(char + '0' * i)
	print(len(out))
	print(*out, sep='\n')


t = int(input())
for z in range(t):
	n = int(input())
	count = 1
	res = []
	while n != 0:
		k = n % 10
		if k != 0:
			res.append(str(k * count))
		count *= 10
		n = n // 10
	ans = ' '
	print(len(res))
	print(ans.join(res))


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


for _ in range(int(input())):
	a = int(input())
	x = []
	i = 0
	while a:
		if a % 10:
			x.insert(0, a % 10 * 10 ** i)
		i += 1
		a //= 10
	print(len(x))
	print(*x)


for _ in range(int(input())):
	n = int(input())
	rnl = []
	m = 1
	while n > 0:
		l = n - 10 * (n // 10)
		if l > 0:
			rnl.append(m * l)
		m *= 10
		n = n // 10
	print(len(rnl))
	print(' '.join(map(str, rnl)))


t = int(input())
for i in range(0, t):
	n = int(input())
	summ = 0
	summOfD = 0
	tmp = n
	while tmp:
		d = tmp % 10
		if d != 0:
			summOfD += 1
		tmp //= 10
	print(summOfD)
	tmp = n
	while tmp:
		summ += 1
		d = tmp % 10
		if d != 0:
			print(d * 10 ** (summ - 1), '', end='')
		tmp //= 10
	print()


for _ in range(int(input())):
	n = int(input())
	ans = []
	i = 1
	while n:
		if n % 10:
			ans.append(n % 10 * 10 ** (i - 1))
		n //= 10
		i += 1
	print(len(ans))
	print(*ans, sep=' ')


for _ in range(int(input())):
	n = int(input())
	if n < 10:
		print(1)
		print(n)
	else:
		a = []
		j = 0
		while n > 0:
			a.append(n % 10 * 10 ** j)
			n = n // 10
			j += 1
		c = 0
		b = []
		for i in a:
			if i != 0:
				c += 1
				b.append(i)
		print(c)
		print(*b)


def print_round(s):
	s = list(str(s))
	s = [int(i) for i in s]
	r = [10 ** i for i in range(len(s))]
	r = r[::-1]
	ans = [r[i] * s[i] for i in range(len(s))]
	ans = [i for i in ans if i != 0]
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()
t = int(input())
for i in range(t):
	n = int(input())
	print_round(n)


t = int(input())
for i in range(t):
	a = []
	b = 1
	num = int(input())
	num1 = list(str(num))
	for i in range(len(num1)):
		if num1[i] != 0:
			res = num % 10
		num = int(num / 10)
		res = res * b
		b = b * 10
		a.append(res)
	count = 0
	for i in range(len(a)):
		if a[i] != 0:
			count = count + 1
	print(count)
	for i in range(len(a)):
		if a[i] != 0:
			print(a[i], end=' ')
	print()


n = int(input())
sum_num = [int(input()) for i in range(n)]
for num in sum_num:
	cnt = 10
	rec = []
	while True:
		temp = num % cnt
		if temp != 0:
			rec.append(temp)
			num -= temp
		cnt *= 10
		if temp == num:
			break
	print(len(rec))
	print(*rec)


t = int(input())
for tt in range(t):
	s = input()
	sol = []
	for i in range(len(s)):
		if s[i] != '0':
			sol.append(s[i] + '0' * (len(s) - i - 1))
	print(len(sol))
	print(' '.join(sol))


x = int(input(''))
cout = 0
for i in range(x):
	l = []
	if cout == 0:
		s = int(input(''))
		cout = 1
	else:
		s = int(input('\n'))
	s = list(str(s))
	s.reverse()
	for i in range(0, len(s)):
		z = int(s[i]) * 10 ** i
		l.append(z)
	l = set(l)
	for j in l:
		if j == 0:
			l.remove(0)
			break
	print(len(l))
	for i in l:
		print(str(i) + ' ', end='')


import collections
import operator
for _ in range(int(input())):
	n = int(input())
	count = 0
	res = []
	num = 1
	while n > 0:
		if n % 10 != 0:
			count += 1
			val = num * (n % 10)
			res.append(val)
		num *= 10
		n = n // 10
	print(count)
	print(*res, sep=' ')


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()


t = int(input())
for T in range(t):
	n = input()
	List = []
	i = 0
	while i < len(n):
		if n[i] != '0':
			num = int(n[i]) * 10 ** (len(n) - i - 1)
			List.append(num)
		i += 1
	print(len(List))
	print(*List)


def func(A):
	ans = []
	l = len(str(A)) - 1
	while True:
		a = A // 10 ** l
		if a != 0:
			ans.append(a * 10 ** l)
		A = A % 10 ** l
		if A == 0:
			return ans
		l -= 1
x = int(input())
a = []
for _ in range(x):
	a.append(int(input()))
for i in a:
	ans = func(i)
	print(len(ans))
	print(' '.join(list(map(str, ans))))


casos = int(input())
for c in range(casos):
	numero = input()
	n_digitos = len(numero)
	numero = int(numero)
	if n_digitos == 1:
		print(n_digitos)
		print(numero)
	else:
		k = 10
		result = []
		for i in range(n_digitos):
			x = numero % k
			if x != 0:
				result.append(x)
			numero -= x
			k *= 10
		y = len(result)
		print(y)
		temp = 0
		for i in range(y - 1):
			print(result[temp], end=' ')
			temp += 1
		print(result[-1])


def rounds(num):
	c = 1
	p = []
	while num != 0:
		z = num % 10
		p.append(z * c)
		num = num // 10
		c = c * 10
	l = []
	count = 0
	for i in p:
		if i > 0:
			count += 1
			l.append(i)
	print(count)
	print(*l, sep=' ')
for _ in range(int(input())):
	num = int(input())
	rounds(num)


t = int(input())
for i in range(0, t):
	m = int(input())
	str1 = str(m)
	l1 = len(str1)
	l = []
	i = 0
	for j in range(l1 - 1, -1, -1):
		if str1[j] != 0:
			z = int(str1[j])
			zz = z * pow(10, i)
			l.append(zz)
		i += 1
	xo = l.count(0)
	for j in range(0, xo):
		l.remove(0)
	print(len(l))
	print(*l, sep=' ')


for _ in range(int(input())):
	n = input()
	k = len(n) - 1
	l = []
	l1 = []
	for i in n:
		a = i + k * '0'
		l.append(int(a))
		k -= 1
	for i in range(len(l)):
		if l[i] != 0:
			l1.append(l[i])
	print(len(l1))
	print(*l1)


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


t = int(input())
a = []
for i in range(t):
	a.append(int(input()))
for i in a:
	temp = []
	while i > 0:
		temp.append(i % 10)
		i //= 10
	ct = 0
	res = []
	n = len(temp)
	for x in range(n):
		if temp[x] != 0:
			ct += 1
			res.append(10 ** x * temp[x])
	print(ct)
	for x in res:
		print(x, end=' ')


def main():
	checks = [10000, 1000, 100, 10, 1]
	inputs = []
	answer = []
	times = int(input())
	for time in range(times):
		aux = int(input())
		inputs.append(aux)
	for number in inputs:
		for check in checks:
			aux = number // check
			if aux > 0:
				aux *= check
				answer.append(aux)
				number -= aux
		print(len(answer))
		for item in answer:
			if item % 10 == 0:
				print(item, end=' ')
			else:
				print(item)
		answer = []
main()


a = int(input())
for i in range(a):
	b = list(input())
	c = len(b) - 1
	d = b.copy()
	while d[-1] == '0':
		d.pop(-1)
	ans = 0
	for num in b:
		if int(num) != 0:
			ans += 1
	print(ans)
	k = 1
	for num in b:
		if int(num) != 0:
			if k == ans:
				print(int(num + '0' * c))
				continue
			else:
				print(int(num + '0' * c), end=' ')
			k += 1
		c -= 1


for iii in range(int(input())):
	n = input()
	res = []
	for i in range(0, len(n)):
		if n[i] != '0':
			tmp = n[i] + '0' * (len(n) - i - 1)
			res.append(tmp)
	print(len(res))
	print(*res)


testy = int(input(''))
results = []

def rozbij(x):
	i = 0
	n = x
	result = []
	while n > 0:
		if n % 10 != 0:
			result.append(int(n % 10 * 10 ** i))
		n = n - n % 10
		n = n / 10
		i += 1
	return result
for i in range(0, testy):
	n = int(input(''))
	results.append(rozbij(n))
for result in results:
	print(len(result))
	for czesc in result:
		print(czesc, end='')
		print(' ', end='')
	print('')


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


test_case = int(input())
while test_case > 0:
	l = []
	num = int(input())
	i = 1
	while num > 0:
		rem = num % 10
		if rem != 0:
			l.append(rem * i)
		num //= 10
		i *= 10
	print(len(l))
	for j in range(len(l)):
		print(l[j], end=' ')
	test_case -= 1


def burst(c, p):
	q = str(c)
	q += '0' * p
	return q
tc = int(input())
for _ in range(tc):
	a = input()
	n = len(a)
	ans = []
	for i in range(n):
		c = a[i]
		if c != '0':
			ans.append(burst(c, n - 1 - i))
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
out = []
for i in range(t):
	num = int(input())
	output_str = ''
	dig = []
	while num != 0:
		dig.append(num % 10)
		num /= 10
		num = int(num)
	power = 1
	for i in range(len(dig)):
		dig[i] = dig[i] * power
		power *= 10
	x = 0
	di = []
	for i in dig:
		if i != 0:
			x += 1
			di.append(str(i))
	output_str = ' '.join(di)
	out.append((x, output_str))
for (x, o) in out:
	print(x)
	print(o)


t = int(input())
for _ in range(t):
	n = input()
	l = len(n)
	arr = []
	for i in range(l):
		if n[i] != '0':
			arr += [int(n[i]) * 10 ** (l - i - 1)]
	print(len(arr))
	print(' '.join([str(i) for i in arr]))


for ix in range(int(input())):
	n = input()
	a = []
	x = len(n)
	for i in range(x):
		pp = str(int(n[i]) * 10 ** (x - 1 - i))
		if pp != '0':
			a.append(pp)
	print(len(a))
	print(' '.join(a))


input_data = [int(input()) for x in range(int(input()))]
for n in input_data:
	count = 0
	mas = []
	for j in range(len(str(n))):
		if n % 10 != 0:
			mas.append(n % 10 * 10 ** j)
			count += 1
		n //= 10
	print(count)
	print(*mas)


def solve(n):
	n = str(n)
	exp = len(n) - 1
	res = []
	for d in n:
		if d != '0':
			res.append(int(d) * 10 ** exp)
		exp -= 1
	print(len(res))
	print(' '.join(map(str, res)))
t = int(input())
for _ in range(t):
	n = int(input())
	solve(n)


for _ in range(int(input())):
	n = input()
	z = n[1:]
	if len(set(z)) == 1 and z[0] == '0':
		print(1)
		print(n)
	else:
		a = ''
		for i in range(len(n)):
			if n[i] != '0':
				a += n[i]
		print(len(a))
		for i in range(len(n)):
			if n[i] != '0':
				print(n[i] + '0' * (len(n) - 1 - i), end=' ')
		print()


import sys
from os import path
if path.exists('C:/Users/prana/Desktop/sublime/input.txt'):
	sys.stdin = open('C:/Users/prana/Desktop/sublime/input.txt', 'r')
	sys.stdout = open('C:/Users/prana/Desktop/sublime/output.txt', 'w')

def solve():
	n = input()
	n = list(n)
	ans = []
	for i in range(len(n)):
		if n[i] != '0':
			ans.append(int(n[i]) * 10 ** (len(n) - i - 1))
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print(end='\n')
T = 1
T = int(input())
for _ in range(1, T + 1):
	print('Case #', _, file=sys.stderr)
	solve()


n = int(input())
for i in range(n):
	num = input()
	numlen = len(num)
	roundup = []
	if numlen == 1:
		print(1)
		print(num)
	else:
		zeronum = numlen
		for j in range(numlen):
			if num[j] != '0':
				a = num[j] + '0' * (zeronum - 1)
				roundup.append(a)
			zeronum = zeronum - 1
		print(len(roundup))
		print(' '.join(roundup))


a = int(input())
for i in range(a):
	b = int(input())
	f = len(str(b))
	g = str(b)
	kl = g.count('0')
	print(f - kl)
	dd = []
	for j in range(f):
		gl = int(g[j]) * int('1' + '0' * (f - j - 1))
		if gl != 0:
			dd.append(gl)
	print(' '.join(map(str, dd)))


t = int(input())
for _ in range(t):
	n = input()
	lenn = len(n)
	print(lenn - n.count('0'))
	ansl = []
	for (num, s) in enumerate(reversed(n)):
		if s != '0':
			ansl.append(s + '0' * num)
	print(' '.join(ansl))


for _ in range(int(input())):
	ans = [int(num) * 10 ** i for (i, num) in enumerate(reversed(input())) if num != '0']
	print(len(ans))
	print(*ans)


t = int(input())
while t > 0:
	n = int(input())
	d = [int(i) for i in str(n)]
	cnt = len(d) - str(n).count('0')
	print(cnt)
	for i in range(len(d)):
		p = len(d) - 1 - i
		m = d[i] * 10 ** p
		if m > 0:
			print(m, end=' ')
	print()
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	print(len(str(n)) - str(n).count('0'))
	k = 1
	while n != 0:
		print(str(n % 10 * k) + ' ' if n % 10 else '', end='')
		k *= 10
		n //= 10
	print()


t = int(input())
for _ in range(t):
	x = int(input())
	c = 10
	l = []
	while x >= c // 10:
		y = x % c
		if y != 0:
			l.append(x % c)
			x -= x % c
		c *= 10
	print(len(l))
	for i in range(len(l)):
		print(l[i], end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	count = 0
	ans = ''
	power = 0
	while n > 0:
		if n % 10 != 0:
			ans = ans + str(10 ** power * (n % 10)) + ' '
			count += 1
		n = int(n / 10)
		power += 1
	print(count)
	print(ans)


for ii in range(int(input())):
	n = int(input())
	if n <= 10:
		print(1)
		print(n)
	else:
		z = []
		c = 0
		n = [int(x) for x in str(n)]
		for i in range(len(n)):
			if n[i] != 0:
				c += 1
				z.append(str(n[i]) + '0' * (len(n) - (i + 1)))
		print(c)
		for i in z:
			print(i, end=' ')
		print()


def solve(n):
	ans = []
	while n > 0:
		n_str = str(n)
		new_num = int(n_str[0]) * 10 ** (len(n_str) - 1)
		ans.append(str(new_num))
		n = n - new_num
	return ans
t = int(input())
for i in range(t):
	answer = solve(int(input()))
	print(len(answer))
	print(' '.join(answer))


n = int(input())
for i in range(n):
	number = input()
	list_of_numbers = []
	for j in range(len(number) - 1, -1, -1):
		if number[j] != '0':
			list_of_numbers.append(number[j] + '0' * (len(number) - 1 - j))
	print(len(list_of_numbers))
	print(*list_of_numbers)


t = int(input())
for q in range(t):
	n = int(input())
	l = len(str(n))
	k = 0
	a = []
	for i in range(l, 0, -1):
		h = n // 10 ** (i - 1)
		if h != 0:
			k += 1
			a += str(h) + '0' * (i - 1) + ' '
		n = n % 10 ** (i - 1)
	print(k)
	a = a[:len(a)]
	for j in a:
		print(j, end='')


t = int(input())
for j in range(t):
	n = int(input())
	l = 0
	c = n
	l0 = 0
	while c // 10 != 0:
		c = c // 10
		l += 1
	l += 2
	c = n
	lol = []
	for i in range(l):
		kek = c % 10 ** (i + 1) // 10 ** i * 10 ** i
		if kek == 0:
			continue
		lol = [kek] + lol
		l0 += 1
	print(l0)
	print(*lol)


for _ in range(int(input())):
	ans = []
	n = int(input())
	if n // 1000:
		ans.append(n // 1000 * 1000)
		n -= n // 1000 * 1000
	if n // 100:
		ans.append(n // 100 * 100)
		n -= n // 100 * 100
	if n // 10:
		ans.append(n // 10 * 10)
		n -= n // 10 * 10
	if n % 10:
		ans.append(n % 10)
	print(len(ans))
	print(' '.join((str(x) for x in ans)))


m = []
for _ in range(int(input())):
	mas = []
	chislo = int(input())
	k = 10
	while chislo != 0:
		numb = chislo % k
		if numb != 0:
			mas.append(str(numb))
		k = k * 10
		chislo = chislo - numb
	kol = str(len(mas))
	m.append(kol)
	mas = ' '.join(mas)
	m.append(mas)
print('\n'.join(m))


t = int(input())
for _ in range(t):
	n = int(input())
	x = 1
	res = []
	while n:
		if n % 10:
			res.append(n % 10 * x)
		n //= 10
		x *= 10
	print(len(res))
	print(' '.join(map(str, res)))


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


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


t = int(input())
count = 0
while count < t:
	count += 1
	n = input()
	ans = 0
	string = ''
	for i in list(range(len(n))):
		if n[i] != '0':
			ans += 1
			string += n[i] + (len(n) - i - 1) * '0' + ' '
	print(ans)
	print(string)


for _ in range(int(input())):
	n = int(input())
	res = []
	tens = 1
	while n > 0:
		digit = n % 10
		if digit != 0:
			res.append(digit * tens)
		tens = tens * 10
		n = n // 10
	print(len(res))
	for i in res:
		print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	s = input()
	z = '0'
	non = len(s) - s.count('0')
	print(non)
	if non == 1:
		print(s)
	elif non > 1:
		for j in range(0, len(s)):
			if s[j] != '0':
				ans = s[j] + (len(s) - j - 1) * z
				print(ans, end=' ')
		print()


for _ in range(int(input())):
	n = input()
	ans = []
	zr = len(n) - 1
	for i in n:
		if i == '0':
			zr -= 1
			continue
		ans.append(i + '0' * zr)
		zr -= 1
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


n = int(input())

def isround(nn):
	if nn < 10:
		return True
	sd = str(nn)
	digits = len(sd)
	return nn - int(sd[0]) * 10 ** (digits - 1) == 0
for i in range(n):
	k = int(input())
	ans = []
	sd = str(k)
	ctr = len(sd) - 1
	while k:
		if isround(k):
			ans.append(str(k))
			break
		ff = int(sd[0]) * 10 ** ctr
		ans.append(str(ff))
		k = k - ff
		sd = str(k)
		ctr = len(sd) - 1
	print(len(ans))
	print(' '.join(ans))


t = int(input())
for i in range(t):
	n = int(input())
	strN = str(n)
	arr = []
	for (_, d) in enumerate(strN):
		if d != '0':
			arr.append(d + '0' * (len(strN) - 1 - _))
	print(len(arr))
	print(' '.join(arr))


def find(a):
	p = 0
	li = []
	while a > 0:
		dig = a % 10
		x = dig * 10 ** p
		if x > 0:
			li.append(x)
		p = p + 1
		a = a // 10
	y = [str(char) for char in li]
	print(len(li))
	print(' '.join(y))
n = int(input())
for i in range(0, n):
	a = int(input())
	find(a)


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()


tc = int(input())
for _ in range(tc):
	num = list(input())
	rounds = []
	for i in range(len(num)):
		if num[i] != '0':
			rounds.append(int(num[i]) * 10 ** (len(num) - i - 1))
	print(len(rounds))
	for x in rounds:
		print(x, end=' ')
	print()


def answer():
	n = int(input())
	ans = []
	while n:
		c_out = ''
		targ = input()
		l_targ = len(targ)
		i = 0
		while i < l_targ:
			if targ[i] != '0':
				c_out += targ[i] + '0' * (l_targ - i - 1)
				c_out += ' '
			i += 1
		ans.append(c_out)
		n -= 1
	for x in ans:
		j = 0
		for y in x:
			if y == ' ':
				j += 1
		print(j)
		print(x)
answer()


debugging = False

def debug(*value):
	if debugging:
		for i in value:
			print(i, end='')
		print()
testcases = int(input())
for _ in range(testcases):
	no = input()
	size = len(no)
	count = 0
	total = 0
	solutions = []
	for i in no:
		if i != '0':
			total += 1
			solutions.append(str(i) + '0' * (size - count - 1))
		count += 1
	print(total)
	for i in solutions:
		print(i, end=' ')
	print()


def pro_A(n):
	i = 1
	I = []
	while n > 0:
		I.append(int(n % 10) * i)
		n = n // 10
		i *= 10
	return I
t = int(input())
for i in range(t):
	I = []
	i = int(input())
	I = pro_A(i)
	if 0 in I:
		I = list(set(I))
		I.remove(0)
	print(len(I))
	for j in I:
		if j != 0:
			print(j, end=' ')


for i in range(int(input())):
	n = input()
	b = len(n)
	v = 0
	c = []
	for i in range(b):
		if n[i] != '0':
			v = v + 1
			m = b - i - 1
			l = n[i] + m * '0'
			c.append(l)
	print(v)
	print(*c, sep=' ')


def solve():
	n = input()
	app = []
	l = len(n)
	for i in range(l - 1):
		if int(n[i]) != 0:
			app.append(str(int(n[i]) * 10 ** (l - i - 1)))
	if int(n[l - 1]) != 0:
		app.append(n[l - 1])
	print(len(app))
	print(' '.join(app))
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for i in range(t):
	n = int(input())
	r = str(n)
	l = len(r)
	m = []
	for (ind, ele) in enumerate(r):
		if ele != '0':
			m.append(ele + '0' * (l - ind - 1))
	print(len(m))
	print(*m)


T = int(input())
for i in range(T):
	N = input()
	L = len(N)
	if L == 1:
		print('1')
		print(N)
	else:
		N = int(N)
		j = 0
		count = 0
		ans = []
		while L > 0:
			x = N % 10
			N = N // 10
			if x != 0:
				x = x * 10 ** j
				ans.append(x)
				count += 1
			j += 1
			L -= 1
		print(count)
		print(*ans)


from sys import stdin
import math
a = int(stdin.readline())
for b in range(0, a):
	c = int(stdin.readline())
	C = str(c)
	count = 0
	for e in C:
		if e != '0':
			count += 1
	print(count)
	while c > 0:
		d = int(math.floor(math.log10(c)))
		if c - 10 ** d * int(math.floor(c / 10 ** d)) == 0:
			print(10 ** d * int(math.floor(c / 10 ** d)))
		else:
			print(10 ** d * int(math.floor(c / 10 ** d)), end=' ')
		c -= 10 ** d * int(math.floor(c / 10 ** d))


for _ in range(int(input())):
	l = []
	x = []
	n = input()
	for i in n:
		l.append(i)
	for j in range(len(l)):
		if l[j] != '0':
			x.append(l[j])
			z = len(l) - (j + 1)
			x.append('0' * z)
		else:
			pass
	print(len(x) // 2)
	for i in range(0, len(x), 2):
		a = ''.join(x[i:i + 2])
		print(a, end=' ')
	print(end='\n')


def summ(i):
	s = [int(a) for a in list(str(i))]
	s.reverse()
	s = [s[a] * 10 ** a for a in range(len(s))]
	s = [i for i in s if i != 0]
	return s
t = int(input())
for i in range(t):
	num = int(input())
	ns = summ(num)
	k = len(ns)
	print(k)
	for i in ns:
		print(i, end=' ')
	print('')


cases = int(input())
for case in range(cases):
	n = int(input())
	count = 1
	res = 0
	n1 = n
	while n1 != 0:
		if n1 % 10 != 0:
			res += 1
		n1 = int(n1 / 10)
	print(res)
	while n != 0:
		r = n % 10
		n = int(n / 10)
		if r * count != 0:
			print(r * count, end=' ')
		count *= 10
	print()


for _ in range(int(input())):
	current = input()[::-1]
	tens = 0
	has = []
	for i in current:
		if i != '0':
			has.append(i + '0' * tens)
		tens += 1
	print(len(has))
	print(' '.join([x for x in has]))


import math
import sys
from collections import defaultdict, Counter, deque, OrderedDict
import bisect
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]
from itertools import accumulate, groupby
import sys
for _ in range(int(input())):
	N = int(input())
	S = str(N)[::-1]
	Ans = []
	for i in range(len(S)):
		if S[i] != '0':
			Ans.append(S[i] + '0' * i)
	print(len(Ans))
	print(*Ans)


t = int(input())
for _ in range(t):
	a = input()[::-1]
	l = len(a)
	arr = []
	for i in range(0, l):
		c = int(a[i]) * 10 ** i
		if c != 0:
			arr.append(c)
	print(len(arr))
	print(*arr)


resultados = []
for i in range(int(input())):
	cadena = input()
	cont = 0
	aux = []
	for j in range(len(cadena)):
		if int(cadena[j]) != 0:
			cont = cont + 1
			aux.append(int(cadena[j]) * 10 ** (len(cadena) - j - 1))
	aux2 = []
	aux2.append(cont)
	aux2.append(aux)
	resultados.append(aux2)
for i in range(len(resultados)):
	print(resultados[i][0])
	for j in range(len(resultados[i][1])):
		print(resultados[i][1][j], end=' ')
	print('')


t = int(input())
for i in range(t):
	a = input()
	d = 10
	b = a.count('0')
	c = len(a) - b
	print(c)
	if c == 1:
		print(a)
	else:
		for j in range(len(a)):
			if a[j] != '0':
				print(a[j] + '0' * (len(a) - j - 1), end=' ')
		print(' ')


for i in range(int(input())):
	a = int(input())
	b = str(a)
	c = []
	for j in range(len(b)):
		if b[j] != 0:
			c.append(str(int(b[j]) * pow(10, len(b) - 1 - j)))
			if c[-1] == '0':
				c.remove(c[-1])
	print(len(c))
	print(' '.join(c))


import math
tc = int(input())
for kl in range(tc):
	d = input()
	gh = len(d) - d.count('0')
	li = list(d)
	for k in range(len(li)):
		li[k] = int(li[k])
	yu = []
	for chai in range(len(li)):
		if li[chai] != 0:
			yv = len(li) - (chai + 1)
			fg = int(li[chai] * math.pow(10, yv))
			yu.append(str(fg))
	print(gh)
	ch = ' '.join(yu)
	print(ch)


def main():
	import sys, math
	from heapq import heapify, heappush, heappop
	from collections import defaultdict as dd, deque

	def data():
		return sys.stdin.readline().strip()

	def mdata():
		return list(map(int, data().split()))

	def out(*var, end='\n'):
		sys.stdout.write(' '.join(map(str, var)) + end)
	INF = int(1000000000.0)
	mod = int(1000000000.0) + 7
	for t in range(int(data())):
		n = int(data())
		t = 1
		ans = []
		while n:
			if n % 10:
				ans.append(n % 10 * t)
			n //= 10
			t *= 10
		print(len(ans))
		print(*ans)
main()


t = int(input())
for _ in range(t):
	y = []
	n = int(input())
	for i in str(n):
		y.append(i)
	arr = []
	ans = y[0]
	count = len(str(n)) - 1
	for i in range(1, len(y)):
		if y[i] == '0':
			ans = ans + y[i]
			count -= 1
		else:
			ans = ans + '0' * count
			arr.append(ans)
			ans = y[i]
			count -= 1
	arr.append(ans)
	print(len(arr))
	print(*arr)


def fun(n):
	k = 1
	a = []
	while n > 0:
		if n % 10 != 0:
			a.append(str(n % 10 * k))
		k = k * 10
		n = n // 10
	print(len(a))
	print(' '.join(a[::-1]))
n = int(input())
for _ in range(n):
	fun(int(input()))


t = int(input())
for l in range(t):
	num = input()
	i = len(num) - 1
	res = []
	for x in num:
		if x == '0':
			i -= 1
			continue
		res.append(x + '0' * i)
		i -= 1
	print(len(res))
	for x in res:
		print(x, end=' ')
	print('')


from math import *
from copy import *
from heapq import *
from string import *
from random import *
from bisect import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
from collections import defaultdict

def solve(x):
	d = len(str(x))
	ans = []
	s = str(x)[::-1]
	ss = s
	for i in range(len(ss)):
		if s[i] != 0:
			t = 10 ** i
			zz = int(s[i]) * t
			if zz != 0:
				ans.append(zz)
				x -= zz
		s = str(x)[::-1]
	print(len(ans))
	print(*ans)
T = int(input())
for _ in range(T):
	N = int(stdin.readline())
	solve(N)


for j in range(int(input())):
	n = input()
	n = n[::-1]
	i = 0
	l = []
	while i < len(n):
		if n[i] != '0':
			l.append(n[i] + i * '0')
		i = i + 1
	print(len(l))
	print(*l, sep=' ')


def sol(n):
	if len(n) == 1:
		k = 1
	else:
		k = len(n) - n.count('0')
	ans = []
	for i in range(len(n)):
		if n[i] != '0':
			ans.append(n[i] + '0' * (len(n) - i - 1))
	print(k)
	print(*ans)
for i in range(int(input())):
	sol(str(input()))


def is_round(n):
	s = str(n)
	for i in range(1, len(s)):
		if s[i] != '0':
			return False
	return True

def get_results(n):
	result = []
	s = str(n)
	while True:
		max_round = int(s[0]) * 10 ** (len(s) - 1)
		result.append(max_round)
		n = n - max_round
		if n == 0:
			break
		if n < 10:
			result.append(n)
			break
		s = str(n)
	return result
cas = int(input())
for t in range(cas):
	n = int(input())
	if n >= 1 and n <= 9:
		print(1)
		print(n)
	elif is_round(n):
		print(1)
		print(n)
	else:
		result = get_results(n)
		print(len(result))
		print(' '.join([str(c) for c in result]))


def roundOff(n):
	lst = []
	count = 0
	step = 0
	while n != 0:
		s = ''
		last = n % 10
		if last > 0:
			s = str(last) + '0' * count
			lst.append(s)
			step += 1
		count += 1
		n = n // 10
	return (step, lst)
t = int(input())
for _ in range(t):
	n = int(input())
	(count, arr) = roundOff(n)
	print(count)
	print(' '.join(arr))


import os
import sys
input = sys.stdin.readline

def round_nums(n: int):
	n = f'{n}'
	(left, right, end) = (0, 1, len(n) - 1)
	sol = []
	ans = n[left]
	while right != len(n):
		if n[right] == '0':
			right += 1
		else:
			ans += ''.join(['0'] * (end - left))
			sol.append(ans)
			left = right
			ans = n[left]
			right += 1
	ans += ''.join(['0'] * (end - left))
	sol.append(ans)
	return sol
t = int(input())
for _ in range(t):
	n = int(input())
	ans = round_nums(n)
	print(len(ans))
	print(' '.join(ans))


t = int(input())
for i in range(t):
	n = int(input())
	k = 0
	right = 0
	nums = []
	while n > 9:
		if n % 10 == 0:
			right += 1
		else:
			nums.append(str(n % 10) + '0' * right)
			right += 1
		n = n // 10
	else:
		nums.append(str(n) + '0' * right)
		right = 0
		print(len(nums))
		for i in nums:
			print(i, end=' ')
		print()


for _ in range(int(input())):
	x = reversed(str(input()))
	res = []
	ll = ''
	for i in x:
		if i != '0':
			res.append(i + ll)
		ll = ll + '0'
	print(len(res))
	print(' '.join(res))


t = int(input())
for i in range(t):
	k = int(input())
	n = 0
	lst = list()
	while k != 0:
		if k % 10 != 0:
			lst.append(k % 10 * 10 ** n)
			k = k // 10
			n += 1
		elif k % 10 == 0:
			k = k // 10
			n += 1
			continue
	print(len(lst))
	for i in lst:
		print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	number_list = []
	counter = 0
	for j in range(1, 6):
		a = n % 10 ** j
		if a != 0:
			n -= a
			number_list.append(a)
			counter += 1
	print(counter)
	print(*number_list)


t = int(input())
for i in range(t):
	num = input()
	s = len(num)
	cnt = 1
	l = []
	for j in num:
		if j != '0':
			l.append(j + '0' * (s - cnt))
		cnt += 1
	print(len(l))
	for j in l:
		print(j, end=' ')
	print()


for _ in range(int(input())):
	n = input()[::-1]
	pos = 0
	ans = []
	for digit in n:
		if digit != '0':
			ans.append(digit + '0' * pos)
		pos += 1
	print(len(ans))
	print(' '.join(ans))


t = int(input())
integers = []
for i in range(t):
	integers.append(input())
for integer in integers:
	a = len(integer)
	fin = []
	pos = 0
	count = 0
	for i in range(-1, -(a + 1), -1):
		t = int(integer[i])
		if t > 0:
			fin.append(t * 10 ** pos)
			count += 1
		pos += 1
	print(count)
	you = ''
	for i in range(len(fin)):
		you = str(fin[i]) + ' ' + you
	print(you)


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


num_cases = int(input())
for i in range(num_cases):
	num = int(input())
	i = 0
	count = 0
	ans = []
	while num > 0:
		digit = num % 10
		if digit != 0:
			count += 1
			ans.append(digit * 10 ** i)
		i += 1
		num //= 10
	print(count)
	for ans_num in ans[::-1]:
		print(ans_num, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	num = []
	d = 0
	a = 0
	while n != n % 10:
		a = n % 10
		n = n // 10
		d += 1
		if a == 0:
			continue
		elif d > 1:
			num.append(a * 10 ** (d - 1))
		else:
			num.append(a)
	num.append(n * 10 ** d)
	print(len(num))
	print(*num[::-1])


t = int(input())
while t > 0:
	t -= 1
	num = input()
	num = int(num)
	sa = 0
	la = []
	while num > 0:
		sa += 1
		if num < 10:
			la.append(num)
			break
		thr = 1
		siz = 0
		while num >= thr:
			siz += 1
			thr *= 10
		ll = 10 ** (siz - 1)
		first = num // ll
		num -= ll * first
		la.append(first * ll)
	print(sa)
	for val in la:
		print(f'{val} ', end='')
	print()


def solve(n):
	a = int(n)
	r = []
	c = 0
	while a > 0:
		d = a % 10
		if d != 0:
			r.append(10 ** c * d)
		c += 1
		a //= 10
	return r
t = int(input())
for _ in range(t):
	n = input()
	r = solve(n)
	print(len(r))
	print(*r)


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


t = int(input())
for i in range(t):
	j = 0
	N = int(input())
	x = N
	while x > 0:
		if x % 10 != 0:
			j += 1
		x = x // 10
	print(j, end=' ')
	x = N
	j = 0
	while x > 0:
		if x % 10 != 0:
			print(x % 10 * 10 ** j, end=' ')
		j += 1
		x = x // 10
	print()


from sys import stdin, stdout
import bisect

def main():
	for _ in range(int(stdin.readline())):
		n = stdin.readline().strip()
		lis = []
		ind = 0
		for i in range(len(n) - 1, -1, -1):
			add = '0' * ind
			lis.append(int(n[i] + add))
			ind += 1
		arr = []
		for i in range(len(lis)):
			if lis[i] != 0:
				arr.append(lis[i])
		print(len(arr))
		for i in range(len(arr)):
			print(arr[i], end=' ')
		print()
main()


b = 'abcdefghijklmnopqrstuvwxyz'
arr = []
d = []
count = 0
t = int(input())
for i in range(t):
	n = str(input())
	k = len(n) - n.count('0')
	print(k)
	for j in range(len(n)):
		if n[j] != '0':
			print(n[j] + '0' * (len(n) - 1 - j), end=' ')
	print()


tc = int(input())
for ctr in range(tc):
	a = input().strip()
	l = []
	for i in range(len(a)):
		if a[i] != '0':
			k = int(a[i]) * 10 ** (len(a) - i - 1)
			l.append(k)
	print(len(l))
	print(*l)


t = int(input())
for q in range(t):
	t_q = int(input())
	l = len(str(t_q))
	tgt = list()
	for i in range(l):
		if int(str(t_q)[i]) == 0:
			pass
		else:
			a = int(str(t_q)[i]) * 10 ** (l - i - 1)
			tgt.append(a)
	res = ''
	for i in tgt:
		res = res + str(i) + ' '
	print(len(tgt))
	print(res)


def solve(tests):

	def helper(num):
		result = [1]
		if num <= 0:
			return [0]
		elif num < 10:
			result[0] = 1
			result.append(num)
			return result
		else:
			nextResult = helper(int(str(num)[1:]))
			totalLen = len(str(num))
			firstDigit = int(str(num)[0])
			return [nextResult[0] + 1] + [firstDigit * 10 ** (totalLen - 1)] + nextResult[1:]
	for test in tests:
		ans = helper(test)
		print(ans[0])
		print(*ans[1:])
t = int(input())
tests = []
for _ in range(t):
	tests.append(int(input()))
solve(tests)


t = int(input())
for _ in range(t):
	n = input()[::-1]
	d = []
	for i in range(len(n)):
		if n[i] != '0':
			d.append(n[i] + '0' * i)
	print(len(d))
	print(*d, sep=' ')


t = int(input())
for i in range(t):
	k = 0
	a = []
	n = int(input())
	if n // 1000 > 0:
		a.append(n // 1000 * 1000)
		k += 1
	if n // 100 % 10 > 0:
		a.append(n // 100 % 10 * 100)
		k += 1
	if n // 10 % 10 > 0:
		a.append(n // 10 % 10 * 10)
		k += 1
	if n % 10 > 0:
		a.append(n % 10)
		k += 1
	print(k)
	print(*a)


def isRound(n):
	n = list(map(int, str(n)))
	if n.count(0) == len(n) - 1 or len(n) == 1:
		return True
	else:
		return False
for _ in range(int(input())):
	s = int(input())
	if isRound(s):
		print(1)
		print(s)
	else:
		s = list(map(int, str(s)))
		print(len(s) - s.count(0))
		for i in range(len(s)):
			if s[i] != 0:
				print(s[i] * 10 ** (len(s) - i - 1), end=' ')
		print()


import sys
import math
from collections import defaultdict
strInp = lambda : input().strip().split()
intInp = lambda : list(map(int, strInp()))
for t in range(int(input())):
	n = int(input())
	ansArr = []
	m = 1
	while n > 0:
		nMod = n % 10
		n = n // 10
		if nMod != 0:
			ansArr.append(nMod * m)
		m = m * 10
	print(len(ansArr))
	for i in ansArr:
		print(i, end=' ')


T = int(input())

def is_ok(k: int) -> bool:
	while k != 0:
		if k % 10 != 0 and k > 9:
			return False
		k = k // 10
	return True

def find_max_ok(n: int) -> int:
	first = n
	total_digist = 1
	while first > 9:
		first = first // 10
		total_digist += 1
	return first * 10 ** (total_digist - 1)

def solve(n: int) -> list:
	ans = []
	while n != 0:
		m = find_max_ok(n)
		ans.append(m)
		n -= m
	return ans
for test in range(T):
	n = int(input())
	arr = solve(n)
	print(len(arr))
	for el in arr:
		print(el, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	out = []
	for (idx, c) in enumerate(reversed(str(n))):
		if c != '0':
			out.append(c + '0' * idx)
	print(len(out))
	print(' '.join(reversed(out)))


n = int(input())
for i in range(n):
	a = int(input())
	a = str(a)
	c = 0
	for j in range(0, len(str(a))):
		if a[j] != '0':
			c += 1
	print(c)
	a = list(str(a))
	d = len(a)
	for (i, v) in enumerate(a):
		if int(v) * 10 ** (d - i - 1) != 0:
			print(int(v) * 10 ** (d - i - 1), end=' ')
	print(end='\n')


import sys

def rs():
	return input().strip()

def ri():
	return int(input())

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

def ia_to_s(a):
	return ' '.join([str(s) for s in a])

def solve(n):
	a = []
	tens = 1
	while n > 0:
		d = n % 10
		n //= 10
		if d > 0:
			a.append(d * tens)
		tens *= 10
	return a

def main():
	for _ in range(ri()):
		n = ri()
		a = solve(n)
		print(len(a))
		print(ia_to_s(a))
main()


for _ in range(int(input())):
	n = int(input())
	l = []
	s = str(n)
	a = len(s)
	for i in range(1, a + 1):
		p = n % 10
		l.append(p * 10 ** (i - 1))
		n = n // 10
	k = len(l) - l.count(0)
	print(k)
	for j in range(len(l) - 1):
		if l[j] != 0:
			print(l[j], end=' ')
	print(l[len(l) - 1])


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
mod = 1000000007
import math
import bisect
abc = 'abcdefghijklmnopqrstuvwxyz'

def main():
	for _ in range(ii()):
		n = ii()
		n = str(n)
		z = n.count('0')
		x = len(n) - z
		if x == 1:
			print(1)
			print(n)
		else:
			print(x)
			for i in range(len(n)):
				y = int(n[i])
				if y:
					print(y * 10 ** (len(n) - i - 1), end=' ')
			print()
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for _ in range(t):
	num = str(input())
	leng = len(num)
	counter = 0
	arr = []
	i = 0
	while len(num) != 0 and i < leng:
		if int(num[-1] + '0' * i) // 1 != 0:
			arr.append(num[-1] + '0' * i)
			counter += 1
		i += 1
		num = num[:len(num) - 1]
	print(counter)
	print(*arr)


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def solve():
	s = minp()
	z = s.count('0')
	print(len(s) - z)
	for i in range(len(s)):
		if s[i] != '0':
			print(s[i] + '0' * (len(s) - i - 1), end=' ')
	print()
for i in range(mint()):
	solve()


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


for _ in range(int(input())):
	s = int(input())
	l = []
	t = 1
	while s:
		if int(s) % 10 != 0:
			l.append(int(s) % 10 * t)
		s = int(int(s) / 10)
		t = t * 10
	print(len(l))
	print(*l, sep=' ')


import math
t = int(input())
while t:
	t = t - 1
	n = input()
	l = len(n)
	count = 0
	arr = []
	for i in range(len(n)):
		if n[i] != '0':
			count += 1
			arr.append(int(int(n[i]) * math.pow(10, l - 1)))
		l -= 1
	print(count)
	for i in range(len(arr)):
		print(arr[i])


t = int(input())
i = 0
while i < t:
	n = int(input())
	l = []
	j = -1
	while n > 0:
		j += 1
		if n % 10 != 0:
			l.append(n % 10 * 10 ** j)
		n = n // 10
	print(len(l))
	print(' '.join(list(map(str, l))))
	i += 1


def getNums(n):
	ans = []
	divisor = 1
	while n > 0:
		v = n % 10 * divisor
		if v > 0:
			ans.append(v)
		divisor *= 10
		n = n // 10
	return ans

def printList(lst):
	for v in lst:
		print(v, end=' ')
	print()
t = int(input())
for i in range(t):
	n = int(input())
	parts = getNums(n)
	print(len(parts))
	printList(parts)


def SumofRoundNumbers():
	length = int(input())
	numData = [None for _ in range(length)]
	for i in range(length):
		numData[i] = int(input())
	result = []
	for elem in numData:
		(num, loc) = [0, 0]
		terms = []
		while elem != 0:
			if elem % 10 != 0:
				terms.append(elem % 10 * 10 ** loc)
				num += 1
			elem = elem // 10
			loc += 1
		result.append([num, terms])
	for elem in result:
		print(elem[0])
		for term in elem[1]:
			print(term, end='\t')
		if elem != result[-1]:
			print()
SumofRoundNumbers()


t = int(input())
for xxx in range(t):
	k = list(map(int, str(input())))
	si = len(k)
	ans = []
	for x in range(si):
		if k[x] != 0:
			ans.append(k[x] * 10 ** (si - x - 1))
		else:
			continue
	print(len(ans))
	for x in ans:
		print(x, end=' ')
	print()


def main():
	t = int(input())
	arr = []
	for i in range(t):
		number = int(input())
		count = 0
		n = 1
		while True:
			l = number % 10 * n
			if int(l) != 0:
				count += 1
				arr.append(int(l))
			number = number // 10
			n = n * 10
			if int(number) == 0:
				break
		print(count)
		for element in arr:
			print(element, end=' ')
		arr.clear()
main()


t = int(input())
b = [input() for i in range(t)]
a = []
for i in range(t):
	s = b[i]
	x = int(s)
	while x > 0:
		x -= int(s[0]) * 10 ** (len(s) - 1)
		a.append(int(s[0]) * 10 ** (len(s) - 1))
		s = str(x)
	print(len(a))
	print(*a)
	a = []


t = int(input())
if t >= 1 and t <= pow(10, 4):
	while t > 0:
		x = int(input())
		if x >= 1 and x <= pow(10, 4):
			xstr = str(x)
			length = len(str(x))
			xx = ''
			xxx = 0
			xprev = 0
			k = 0
			for char in xstr:
				if char != '0':
					k += 1
			print(k)
			for i in range(1, length + 1):
				celoye = int(x // (10 * pow(10, length) / pow(10, i) / 10))
				osta4a = int(x % (10 * pow(10, length) / pow(10, i) / 10))
				xxx = int(celoye * (10 * pow(10, length) / pow(10, i) / 10) - xprev)
				xprev += xxx
				if xxx != 0:
					print(xxx, end=' ')
			print()
		t -= 1


test = int(input())
while test != 0:
	k = input()
	n1 = int(k)
	li = []
	for i in range(len(k)):
		x = n1 % 10
		n1 = n1 / 10
		n1 = int(n1)
		p = 10 ** i
		x = x * p
		if x != 0:
			li.append(x)
	print(len(li))
	print(*li)
	test = test - 1


n = int(input())
for _ in range(n):
	num = reversed(list(input()))
	count = 0
	arr = []
	for (ind, di) in enumerate(num):
		if di is not '0':
			count += 1
			arr.append(di + '0' * ind)
	print(count)
	for ele in arr:
		print(ele, end=' ')
	print()


for _ in range(int(input())):
	n = int(input())
	l = len(str(n))
	temp = []
	i = 10
	for i in str(n):
		x = int(i) * 10 ** (l - 1)
		l -= 1
		temp.append(x)
	final = []
	for i in temp:
		if i != 0:
			final.append(i)
	print(len(final))
	print(*final)


for _ in range(int(input())):
	n = input()
	l = len(n)
	ans = []
	c = 0
	for i in n:
		nu = int(i)
		if nu != 0:
			ans.append(nu * 10 ** (l - 1))
			c += 1
		l -= 1
	print(c)
	for i in ans:
		print(i, end=' ')
	print()


def solve(n):
	div = 1
	sol = []
	while n // div:
		d = n // div % 10
		if d != 0:
			sol.append(d * div)
		div *= 10
	return sol
t = int(input())
for _ in range(t):
	n = int(input())
	sol = solve(n)
	print(len(sol))
	print(' '.join(map(str, sol)))


t = int(input())
for i in range(t):
	n = int(input())
	a = []
	for j in range(6):
		a.append(n // 10 ** (5 - j) * 10 ** (5 - j))
		if a[-1] == 0:
			a.pop()
		else:
			n = n - a[-1]
	print(len(a))
	print(*a)


for test in range(int(input())):
	n = int(input())
	tn = ''.join(reversed(str(n)))
	arr = []
	for i in range(len(tn)):
		if int(tn[i]) > 0:
			s = tn[i]
			for _ in range(i):
				s += '0'
			arr.append(s)
	print(len(arr))
	for i in arr:
		print(i, end=' ')
	print()


t = int(input())
ls = []
for k in range(t):
	x = int(input())
	ls.append(x)
ans2 = []
for i in range(t):
	num = ls[i]
	x = str(num)
	ans = []
	for j in range(len(x)):
		d = num % 10
		num = int(num / 10)
		if d > 0:
			ans.append(d * 10 ** j)
	print(len(ans))
	for x in range(len(ans)):
		print(ans[x], end=' ')
	print(' ')


t = int(input())
for j in range(t):
	n = int(input())
	l = []
	i = 1
	while True:
		if n - n % 10 ** i > 0:
			l.append(n % 10 ** i)
			n -= n % 10 ** i
		elif n - n % 10 ** i == 0:
			l.append(n)
			break
		i += 1
	l1 = []
	for k in l:
		if k != 0:
			l1.append(k)
	print(len(l1))
	for k in range(len(l1)):
		print(l1[k], end=' ')
	print()


for test in range(int(input())):
	n = list(input())
	lt = []
	l = len(n)
	for i in range(l):
		if n[i] != '0':
			t = str(n[i]) + '0' * (l - 1 - i)
			lt.append(t)
	print(len(lt))
	print(*lt, sep=' ')


z = input
for _ in range(int(z())):
	n = z()
	s = ''
	p = len(n)
	c = 0
	for i in range(len(n)):
		x = n[i] + '0' * (p - 1)
		if int(x) > 0:
			s += x + ' '
			c += 1
		p -= 1
	print(c)
	print(s[:-1])


for t in range(int(input())):
	s = input()
	l = len(s)
	s = int(s)
	ans = [0]
	i = 10 ** (l - 1)
	while i >= 1:
		if s % i != 0:
			ans.append(s - s % i)
		else:
			ans.append(s)
		s = s % i
		i = i // 10
	ans = set(ans)
	ans.remove(0)
	print(len(ans))
	print(*ans)


from sys import stdin

def r():
	return stdin.readline().strip()

def r_t(tp):
	return map(tp, r().strip().split())

def r_a(tp):
	return list(r_t(tp))

def solve(x):
	n = len(x)
	ans = [x[0] + '0' * (n - 1)]
	for i in range(1, n):
		if x[i] != '0':
			ans.append(x[i] + '0' * (n - i - 1))
	return ans

def main():
	cases = int(r())
	for case in range(cases):
		n = r()
		ans = solve(n)
		print(len(ans))
		print(*ans)
main()


t = int(input())
for _ in range(t):
	n = input()
	ans = []
	c = 0
	ts = len(n)
	for i in range(len(n)):
		if n[i] != '0':
			ans.append(n[i] + '0' * (ts - i - 1))
			c += 1
	print(c)
	for i in ans:
		print(i, end=' ')


ndatos = int(input())
numbers = []
for i in range(ndatos):
	numbers.append(input())
matrix = []
for i in numbers:
	if len(i) > 1:
		expected = '0' * (len(i) - 1)
		if i[1:] != expected:
			rounds = []
			rounds.append(str(i[0] + '0' * (len(i) - 1)))
			j = 1
			while j < len(i):
				if i[j] != '0':
					rounds.append(str(i[j] + '0' * (len(i) - j - 1)))
				j += 1
			matrix.append(rounds)
		else:
			rounds = []
			rounds.append(i)
			matrix.append(rounds)
	else:
		rounds = []
		rounds.append(i)
		matrix.append(rounds)
for j in matrix:
	print(len(j))
	for i in j:
		print(int(i), end=' ')
	print()


t = int(input())
for i in range(t):
	num = int(input())
	copy = num
	count = 0
	ans = []
	while copy > 0:
		digit = copy % 10
		if digit != 0:
			ans.append(digit * 10 ** count)
		count += 1
		copy = copy // 10
	print(len(ans))
	for i in range(len(ans)):
		print(ans[i], end=' ')
	print()


t = int(input())
for case in range(t):
	n = int(input())
	digits = len(str(n))
	cnt = 0
	str_n = str(n)
	for i in range(len(str_n)):
		if int(str_n[i]) != 0:
			cnt += 1
	print(cnt)
	for i in range(len(str_n)):
		if int(str_n[i]) != 0:
			integ = int(str_n[i])
			print(integ * 10 ** (digits - 1 - i), end=' ')


t = int(input())
k = 0
for _ in range(t):
	num = input()
	ten = 1
	ans = []
	ten = 1
	for i in range(len(num) - 1, -1, -1):
		if num[i] == '0':
			ten *= 10
			continue
		a = int(num[i]) * ten
		ten *= 10
		ans.append(a)
	print(len(ans))
	for i in range(len(ans)):
		print(ans[i], ' ', end='')
	if k != t - 1:
		print()
	k += 1


import sys
t = int(input())
for _ in range(t):
	n = int(input())
	result = []
	pos = 0
	while n > 0:
		if n % 10 > 0:
			result.append(n % 10 * pow(10, pos))
		n = int(n / 10)
		pos += 1
	print(len(result))
	print(' '.join((str(i) for i in result)))


t = int(input())
for i in range(t):
	a = int(input())
	arr = []
	arr2 = []
	for j in range(5):
		arr.append(a % 10)
		a = a // 10
	h = len(arr)
	arr.reverse()
	for k in range(len(arr)):
		arr2.append(arr[k] * 10 ** (h - 1))
		h = h - 1
	arr = []
	for i in arr2:
		if i != 0:
			arr.append(i)
	print(len(arr))
	print(*arr)


import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub
import sys
buff_readline = sys.stdin.buffer.readline
readline = sys.stdin.readline
INF = 2 ** 62 - 1

def read_int():
	return int(buff_readline())

def read_int_n():
	return list(map(int, buff_readline().split()))

def read_float():
	return float(buff_readline())

def read_float_n():
	return list(map(float, buff_readline().split()))

def read_str():
	return readline().strip()

def read_str_n():
	return readline().strip().split()

def error_print(*args):
	print(*args, file=sys.stderr)

def slv(N):
	ans = []
	N = str(N)
	for (i, c) in enumerate(N):
		if c != '0':
			ans.append(c + '0' * (len(N) - i - 1))
	print(len(ans))
	print(*ans)

def main():
	T = read_int()
	for _ in range(T):
		N = read_int()
		slv(N)
main()


t = int(input())
for i in range(t):
	n = int(input())
	r = []
	j = 0
	while n > 0:
		rem = n % 10
		n //= 10
		if rem != 0:
			r.append(rem * 10 ** j)
		j += 1
	print(f'{len(r)}')
	print(*r)


t = int(input())
while t:
	n = int(input())
	ans = []
	tot = 0
	i = 0
	while n:
		if not n % 10:
			tot += 1
		else:
			ans.append(n % 10 * 10 ** i)
		n //= 10
		i += 1
	print(i - tot)
	print(' '.join(map(str, ans)))
	t -= 1


t = int(input())
for x in range(t):
	n = str(input())
	z = len(n) - 1
	out = []
	for i in range(len(n)):
		if n[i] != '0':
			out.append(str(n[i]) + '0' * z)
		z -= 1
	print(len(out))
	print(*out)


t = int(input())
for _ in range(t):
	n = int(input())
	s = str(n)
	l = []
	p = len(s)
	i = p - 1
	while i >= 0:
		if s[i] != '0':
			l.append(int(s[i]) * 10 ** (p - 1 - i))
		i -= 1
	print(len(l))
	for x in l:
		print(x, end=' ')
	print()


import sys
from bisect import *
from math import floor, sqrt, ceil, factorial as F, gcd, pi
from itertools import chain, combinations, permutations, accumulate
from collections import Counter, defaultdict, OrderedDict, deque
from array import array
INT_MAX = sys.maxsize
INT_MIN = -sys.maxsize - 1
mod = 1000000007
ch = 'abcdefghijklmnopqrstuvwxyz'
lcm = lambda a, b: a * b // gcd(a, b)
setbit = lambda x: bin(x)[2:].count('1')
input = lambda : sys.stdin.readline()

def solve():
	T = int(input())
	for _ in range(T):
		n = input().replace('\n', '')
		ans = []
		for i in range(len(n) - 1, -1, -1):
			if int(n[i]) * pow(10, len(n) - i - 1) != 0:
				ans.append(int(n[i]) * pow(10, len(n) - i - 1))
		print(len(ans))
		print(*ans[::-1])
try:
	sys.stdin = open('input.txt', 'r')
except:
	pass
solve()


n = int(input())
a = [int(input()) for _ in range(n)]
(b, c) = ([0 for _ in range(n)], [[] for _ in range(n)])
for i in range(len(a)):
	res = 0
	while a[i] > 0:
		k = a[i] % 10
		k = k * 10 ** res
		a[i] = a[i] // 10
		if k != 0:
			c[i].append(k)
			b[i] += 1
		res += 1
for i in range(len(b)):
	print(b[i])
	print(' '.join([str(j) for j in c[i]]))


t = int(input())
for _ in range(t):
	n = int(input())
	mult = 1
	ans = []
	while n:
		last = n % 10
		n //= 10
		if last == 0:
			mult *= 10
			continue
		else:
			ans.append(last * mult)
		mult *= 10
	print(len(ans))
	print(*ans)


def main():
	cases = input()
	for i in range(int(cases)):
		curr = int(input())
		if curr > 0:
			places = [False, False, False, False]
			s = str(curr)
			count = 0
			a = len(s) - 1
			while a >= 0:
				if s[a] != '0':
					places[a] = True
					count += 1
				a -= 1
			if count <= 1:
				print(1)
				print(s)
			else:
				print(count)
				a = len(s) - 1
				toprint = ''
				while a >= 0:
					if places[a]:
						digit = int(s[a])
						if digit != 0:
							toprint += str(digit * 10 ** (len(s) - a - 1)) + ' '
					a -= 1
				print(toprint)
main()


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()


t = int(input())
for i in range(t):
	k = input()
	t = []
	while len(k) > 0:
		if k[0] != '0':
			t.append(k[0] + '0' * len(k[1:]))
		k = k[1:]
	if k != '0' or k != '':
		t.append(k)
	print(len(t) - 1)
	print(*t, sep=' ')


t = int(input())
j = 0
while j < t:
	a = input()
	s = []
	for i in range(len(a)):
		if a[i] != '0':
			s.append(a[i] + '0' * (len(a) - i - 1))
	print(len(s))
	print(*s)
	j += 1


t = int(input())
for i in range(t):
	co = 0
	n = int(input())
	a = n // 10000 * 10000
	b = n % 10000 // 1000 * 1000
	c = n % 1000 // 100 * 100
	d = n % 100 // 10 * 10
	e = n % 10 // 1
	if a != 0:
		co = co + 1
	if b != 0:
		co = co + 1
	if c != 0:
		co = co + 1
	if d != 0:
		co = co + 1
	if e != 0:
		co = co + 1
	print(co)
	if a != 0:
		print(a, end=' ')
	if b != 0:
		print(b, end=' ')
	if c != 0:
		print(c, end=' ')
	if d != 0:
		print(d, end=' ')
	if e != 0:
		print(e, end=' ')
	print()


t = int(input())
while t > 0:
	n = int(input())
	s = str(n)
	m = len(s)
	if '0' not in s:
		print(m)
		for i in range(m):
			print(int(s[i]) * pow(10, m - i - 1), end=' ')
	else:
		cnt = 0
		for i in s:
			if i != '0':
				cnt += 1
		print(cnt)
		for i in range(m):
			if s[i] != '0':
				x = int(s[i]) * pow(10, m - i - 1)
				print(x, end=' ')
	print()
	t -= 1


testcase = int(input())
for _ in range(testcase):
	num = int(input())
	l = list(str(num))
	l = [int(i) for i in l]
	(count, res) = (0, [])
	l = l[::-1]
	for (i, n) in enumerate(l[:-1]):
		if n != 0:
			count += 1
			res.append(n * pow(10, i))
	count += 1
	res.append(l[-1] * pow(10, len(l) - 1))
	print(count)
	print(*res)


for _ in range(int(input())):
	a = list(map(int, input()))
	same = 0
	for i in a:
		if i != 0:
			same += 1
	k = len(a) - 1
	print(same)
	for i in a:
		if i != 0:
			print(i, '0' * k, end=' ', sep='')
		k -= 1
	print()


def Spider():
	a = str(input())
	k = 0
	b = []
	y = 0
	while y < len(a):
		if a[y] != '0':
			b.append(a[y] + (len(a) - y - 1) * '0')
			k += 1
		y += 1
	print(k)
	print(*b)
TIMES = 1
TIMES = int(input())
for TIME_TEMP in range(TIMES):
	Spider()


t = int(input())
for q in range(t):
	s = input()
	answ = ''
	k = 0
	for i in range(len(s)):
		if s[i] != '0':
			answ += s[i] + '0' * (len(s) - i - 1) + '\n'
			k += 1
	print(k, '\n', answ)


n = int(input())
for i in range(n):
	sum = int(input())
	(ans, base) = ([], 1)
	while sum > 0:
		d = int(sum % 10)
		sum = int(sum / 10)
		if d != 0:
			ans.append(str(d * base))
		base *= 10
	print(len(ans))
	print(' '.join(ans))


for case in range(int(input())):
	tmp = list(input())
	k = 0
	ans = ''
	dgt = len(tmp)
	for i in tmp:
		dgt -= 1
		if i != '0':
			k += 1
			ans += i
			for j in range(dgt):
				ans += '0'
			ans += ' '
	print(k)
	print(ans)


t = int(input())
while t != 0:
	x = input()
	rez = ''
	if x.count('0') == len(x) - 1:
		print(1)
		print(x)
	else:
		k = 0
		for i in range(len(x)):
			if x[i] != '0':
				k += 1
				rez = rez + str(int(x[i])) + '0' * (len(x) - i - 1) + ' '
		print(k)
		print(rez)
	t -= 1


t = int(input())
for i in range(t):
	a = str(input())
	k = []
	s = []
	h = list()
	l = len(a) - 1
	for j in a:
		k.append(10 ** l)
		l -= 1
	for z in range(len(a)):
		s.append(a[z])
	for o in range(len(s)):
		s[o] = int(s[o])
	for (q, w) in zip(k, s):
		if w != 0:
			h.append(q * w)
	print(len(h))
	print(*h)


import math

def getRoundNumbers(x):
	k = int(math.log10(x))
	ret = []
	for i in range(k, -1, -1):
		power10 = 10 ** i
		q = x // power10
		if q != 0:
			number = q * power10
			ret.append(str(number))
			x = x - number
	return ret
t = int(input())
for i in range(t):
	x = int(input())
	numbers = getRoundNumbers(x)
	print(len(numbers))
	print(' '.join(numbers))


t = int(input())
for _ in range(t):
	n = str(input())
	wyn = ''
	count = 0
	for x in range(0, len(n)):
		if n[x] != '0':
			count += 1
			wyn += n[x]
			for y in range(x + 1, len(n)):
				wyn += '0'
			wyn += ' '
	print(count)
	print(wyn)


import sys
I = sys.stdin.readline
for _ in range(int(I())):
	n = I().strip()
	l = len(n)
	ans = []
	for i in range(len(n)):
		if n[i] != '0':
			x = n[i] + '0' * (l - i - 1)
			ans.append(x)
	print(len(ans))
	print(*ans)


t = int(input())
for _ in range(t):
	n = input()
	res = []
	if len(n) == 1:
		print(1)
		print(n)
	elif int(n[1:]) == 0:
		print(1)
		print(n)
	else:
		for i in range(len(n)):
			digit = int(n[i])
			if digit == 0:
				continue
			zeros = len(n) - i - 1
			num = digit * 10 ** zeros
			res.append(num)
		print(len(res))
		print(' '.join(map(str, res)))


number_list = lambda : list(map(int, input().split()))
arr2d = lambda rows, cols, v=0: [[v for i in range(cols)] for _ in range(rows)]
t = int(input())
while t > 0:
	n = int(input())
	res = []
	i = 0
	while n > 0:
		d = n % 10
		n = int(n / 10)
		if d == 0:
			i += 1
			continue
		res.append(d * 10 ** i)
		i += 1
	print(len(res))
	for v in res:
		print(v)
	t -= 1


t = int(input())
for i in range(t):
	canPrintLength = True
	summends = []
	num = int(input())
	if num in range(1, 11):
		print(1)
		print(num)
	else:
		a = 10
		g = str(num)
		length = len(g)
		while num != 0:
			rem = num % a
			if rem != 0:
				summends.append(rem)
				a *= 10
				num -= rem
			else:
				a *= 10
				pass
		if canPrintLength == True:
			print(str(len(summends)))
		print(*summends)


t = int(input())
for i in range(t):
	n = input()
	(k, l, size) = (0, [], len(n))
	for j in range(len(n)):
		if n[j] != '0':
			power = 10 ** (len(n) - 1 - j)
			l.append(int(n[j]) * power)
			k += 1
		else:
			continue
	print(k)
	for h in range(len(l)):
		print(l[h])


t = int(input())
for z in range(t):
	a = input()
	res = []
	for i in range(len(a)):
		if a[i] != '0':
			res.append(a[i] + '0' * (len(a) - i - 1))
	print(len(res))
	for i in range(len(res)):
		print(res[i], end=' ')
	print('')


t = int(input())
for test in range(t):
	n = int(input())
	ar = []
	pw = 0
	while n:
		val = n % 10 * 10 ** pw
		if val != 0:
			ar.append(val)
		n = n // 10
		pw += 1
	print(len(ar))
	for x in ar:
		print(x, end=' ')
	print()


case = int(input())
lst = []
for i in range(case):
	i = input()
	l = []
	for x in range(len(i)):
		if i[x] != '0':
			l.append(i[x] + (len(i[x:]) - 1) * '0')
	print(len(l))
	print(' '.join(l))


t = int(input())
for i1 in range(t):
	n = int(input())
	s = str(n)
	s = s.replace('\r', '')
	c = 0
	for i in s:
		if i != '0':
			c += 1
	print(c)
	i = 1
	while n >= 1:
		d = n % 10
		if d != 0:
			print(d * i, end=' ')
		i *= 10
		n = n // 10
	print()


def gameWithCells(n):
	c = 0
	l = []
	d = 1
	while n != 0:
		x = n % 10
		if x != 0:
			c += 1
			l.append(x * d)
		d *= 10
		n //= 10
	return (l, c)
for _ in range(int(input())):
	n = int(input())
	(l, t) = gameWithCells(n)
	print(t)
	print(*l)


for i in range(int(input())):
	a = int(input())
	s = 0
	l = []
	l1 = []
	while a > 0:
		b = a % 10
		a //= 10
		l.append(b)
	l.reverse()
	for j in range(len(l)):
		if l[j] > 0:
			s += 1
			l1.append(l[j] * 10 ** (len(l) - j - 1))
	print(s)
	for j in range(len(l1)):
		if l1[j] > 0:
			if j == len(l1) - 1:
				print(l1[j])
			else:
				print(l1[j], end=' ')


import sys
input = sys.stdin.readline
import random
import copy
import math

def main():
	q = int(input())
	for _ in range(q):
		n = input().replace('\n', '')
		to_p = []
		step = 1
		n = n[::-1]
		for x in range(len(n)):
			if n[x] != '0':
				to_p.append(n[x] + str(0) * x)
		print(len(to_p))
		print(*to_p)
main()


n = int(input())
t = 0
ans = 0
ans2 = ''
for i in range(n):
	a = input()
	if int(a) < 10:
		print(1)
		print(a)
	else:
		ans2 = ''
		t = 0
		ans = 0
		for x in a[::-1]:
			if int(x) != 0:
				ans += 1
				ans2 = ans2 + x + '0' * t + ' '
			t += 1
		print(ans)
		print(ans2)


c = int(input())
nums = []
for i in range(c):
	nums.append(input())
nums_int = list(map(int, nums))

def getNums(x):
	ix = int(x)
	ri = len(x) - x.count('0')
	lx = list(x)
	r = []
	for i in range(len(lx)):
		if lx[i] != '0':
			r.append(int(lx[i]) * 10 ** (len(x) - i - 1))
	rr = list(map(str, r))
	print(ri)
	print(' '.join(rr))
for i in nums:
	getNums(i)


t = int(input())
for i in range(t):
	n = input()
	y = 90
	k = len(n) - 1
	array = []
	for i in range(len(n)):
		y = int(n[i])
		if y != 0:
			array.append(str(y * 10 ** k))
			k -= 1
		else:
			k -= 1
	print(len(array))
	string = ' '.join(array)
	print(string)


t = int(input())
while t != 0:
	n = input()
	list1 = list(n)
	zeroes = len(list1) - 1
	ans = list()
	for i in range(len(list1)):
		p = list1[i]
		for j in range(zeroes):
			p += '0'
		ans.append(p)
		zeroes -= 1
	final_ans = list()
	for i in range(len(ans)):
		if int(ans[i]) != 0:
			final_ans.append(ans[i])
	print(len(final_ans))
	for i in range(len(final_ans)):
		print(final_ans[i], end=' ')
	print()
	t -= 1


for _ in range(int(input())):
	n = int(input())
	result = []
	cur = 0
	while n > 0:
		x = n % 10
		n //= 10
		if x > 0:
			result.append(str(x) + '0' * cur)
		cur += 1
	print(len(result))
	print(' '.join(result))


import sys
input = lambda : sys.stdin.readline().rstrip()

def pin(type=int):
	return map(type, input().split())

def tupin(t=int):
	return tuple(pin(t))

def resolve():
	N = int(input())
	for i in range(N):
		(num,) = pin()
		ans = []
		for c in range(5):
			t = num % 10
			if t != 0:
				ans.append(t * 10 ** c)
			num //= 10
			if num == 0:
				break
		print(len(ans))
		print(*ans)
resolve()


t = int(input())
for _ in range(t):
	n = int(input())
	summands = []
	k = 0
	p = 1
	while n > 0:
		if n % 10 > 0:
			k += 1
			summands.append(n % 10 * p)
		n //= 10
		p *= 10
	print(k)
	for i in summands:
		print(i, end=' ')
	print()


n = int(input())
for i in range(n):
	number = int(input())
	add = list()
	for i in range(1, len(str(number)) + 1):
		if number >= 10:
			rem = number % 10 ** i
			if rem != 0:
				add.append(number % 10 ** i)
				number -= number % 10 ** i
		else:
			add.append(number)
	print(len(add))
	print(*add)


t = int(input())
list1 = []
for n in range(1, t + 1):
	list1.append(str(input()))
for x in list1:
	c = 0
	for a in range(0, len(x)):
		if int(x[a]) > 0:
			c += 1
	print(c)
	for a in range(0, len(x)):
		if int(x[a]) != 0:
			print(int(x[a]) * 10 ** (len(x) - a - 1), end=' ')
	print('')


T = int(input())
for t in range(T):
	a = input()
	k = 0
	esp = 0
	b = int(a[0])
	b = b * 10 ** (len(a) - 1)
	output = list()
	output.append(b)
	for i in range(1, len(a)):
		b = int(a[i])
		if b != 0:
			esp = len(a) - (i + 1)
			b = b * 10 ** esp
			output.append(b)
	k = len(output)
	print(k)
	for o in range(k):
		if k - o != 1:
			print(output[o], end=' ')
		else:
			print(output[o])


t = int(input())
for i in range(t):
	x = int(input())
	arr = list()
	s = 1
	while x != 0:
		d = x % 10
		if d != 0:
			arr.append(d * s)
		s *= 10
		x //= 10
	print(len(arr))
	print(*arr)


n = int(input())
for i in range(n):
	n1 = int(input())
	li = []
	lif = []
	f = str(n1)
	for i in range(len(f)):
		if i != '0':
			li.append(int(f[i]) * 10 ** (len(f) - i - 1))
	for i in range(len(li)):
		if li[i] != 0:
			lif.append(li[i])
	print(len(lif))
	print(*lif)


from sys import stdin, stdout
import heapq
import cProfile, math
from collections import Counter, defaultdict, deque
from bisect import bisect_left, bisect, bisect_right
import itertools
from copy import deepcopy
from fractions import Fraction
import sys, threading
import operator as op
from functools import reduce
import sys

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))

def solve():
	st = input()
	n = len(st)
	if n == 1:
		print('1')
		print(st)
	else:
		i = n - 1
		ans = []
		j = 0
		while i >= 0:
			if st[i] != '0':
				ans.append(int(st[i]) * 10 ** j)
			j += 1
			i -= 1
		print(len(ans))
		print(*ans)

def main():
	solve()
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


t = int(input())
for i in range(t):
	n = int(input())
	s = str(n)
	l = []
	d = len(s)
	c = 0
	for j in range(d):
		if s[j] != '0':
			c += 1
			m = int(s[j])
			k = m * 10 ** (d - 1)
			l.append(k)
		d -= 1
	print(c)
	print(*l)


for _ in range(int(input())):
	n = int(input())
	ans = []
	ini = 10
	while n > 0:
		tmp = n % ini
		n = n - tmp
		if tmp != 0:
			ans.append(tmp)
		ini = ini * 10
	print(len(ans))
	print(*ans)


t = int(input())
while t > 0:
	n = int(input())
	l = []
	mul = 1
	while n > 0:
		temp = n % 10
		value = temp * mul
		if value > 0:
			l.append(value)
		mul *= 10
		n //= 10
	print(len(l))
	print(*l)
	t -= 1


for i in range(int(input())):
	n = str(input())
	s = []
	pos = 0
	counter = 0
	for i in n:
		pos += 1
		if i != '0':
			counter += 1
			summand = i + '0' * (len(n) - pos)
			s.append(summand)
	print(counter)
	print(*s, sep=' ')


t = int(input())
for i in range(t):
	n = input()
	l = len(n)
	r = []
	for j in range(l):
		if n[j] is not '0':
			r += [n[j] + '0' * (l - 1 - j)]
	print(len(r))
	print(*r)


k = int(input())
a = []
for i in range(1, k + 1):
	t = input()
	a.append(t)

def main():
	for i in a:
		set_of_nums = []
		length = len(i)
		num = int(i)
		while num > 0:
			tenth = pow(10, length - 1)
			div_num = int(num / tenth)
			div_num *= tenth
			num = num % tenth
			length = len(str(num))
			set_of_nums.append(div_num)
		print(len(set_of_nums))
		print(*set_of_nums)
main()


def main():
	n = int(input())
	for _ in range(n):
		s = 0
		out = []
		m = input()
		k = len(m)
		for j in range(k):
			if m[j] != '0':
				out.append(m[j] + '0' * (k - j - 1))
				s += 1
		print(s)
		print(' '.join(out))
main()


t = int(input())
for _ in range(t):
	n = input()
	count = 0
	length = len(n)
	result = ''
	for i in range(length):
		if n[i] != '0':
			result += n[i] + '0' * (length - i - 1) + ' '
			count += 1
	print(count)
	print(result)


testcases = int(input())
while testcases > 0:
	testcases = testcases - 1
	number = int(input())
	string = str(number)
	if string.count('0') == len(string) - 1 and string[0] != '0':
		print(1)
		print(number)
		continue
	else:
		newstring = string[1:] + string[0]
		ans = ''
		for i in range(0, len(string)):
			if newstring[i] != '0':
				if i == len(string) - 1:
					ans = ans + ' ' + newstring[i] + '0' * (len(string) - 1)
				else:
					ans = ans + ' ' + newstring[i] + '0' * (len(string) - i - 2)
		ans = ans[1:]
		print(ans.count(' ') + 1)
		print(ans)


t = int(input())
for i in range(t):
	a = str(input())
	s = []
	for i in range(len(a)):
		if a[i] != '0':
			apend_s = a[i] + '0' * (len(a) - i - 1)
			s.append(apend_s)
	print(len(s))
	print(*s)


from __future__ import division, print_function

def get_ints():
	return map(int, input().strip().split())

def get_array():
	return list(map(int, input().strip().split()))
mod = 1000000007

def main():
	for _ in range(int(input())):
		n = int(input())
		s = list(str(n))
		ans = []
		arr = [int(i) for i in s]
		for i in range(len(arr)):
			d = arr[i] * pow(10, len(s) - i - 1)
			if d:
				ans.append(d)
		print(len(ans))
		print(*ans)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


a = int(input())
for i in range(a):
	b = 0
	c = input()
	d = 0
	e = ''
	for j in c:
		b = b + 1
		if j != '0':
			d = d + 1
	for k in c:
		b = b - 1
		if k != '0':
			e = e + (k + '0' * b)
			if b != 0:
				e = e + ' '
	print(d)
	print(e)


from sys import stdin

def iinput():
	return int(stdin.readline())

def sinput():
	return input()

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
t = iinput()
while t:
	t -= 1
	n = input()
	i = len(n) - 1
	j = 0
	ans = []
	while i >= 0:
		if n[j] != '0':
			ans.append(10 ** i * int(n[j]))
		j += 1
		i -= 1
	print(len(ans))
	print(*ans)


t = int(input())
while t:
	i = int(input())
	j = str(i)
	l = len(j)
	ans = []
	for (k, v) in list(enumerate(j)):
		if v != '0':
			ans.append(int(v + '0' * (l - k - 1)))
	print(len(ans))
	print(*ans)
	t -= 1


import math
t = int(input())
for case in range(t):
	n = int(input())
	rList = []
	while n:
		if n < 10:
			rList.append(n)
			n -= n
		else:
			tenPow = math.floor(math.log10(n))
			firstDig = math.floor(n / 10 ** tenPow)
			rList.append(firstDig * 10 ** tenPow)
			n -= firstDig * 10 ** tenPow
	print(len(rList))
	for no in rList:
		print(format(no), end=' ')
	print('\n')


for _ in range(int(input())):
	n = int(input())
	a = []
	p = 1
	while p <= n:
		if n // p % 10:
			a += (n // p % 10 * p,)
		p *= 10
	print(len(a))
	print(*a)


t = int(input())
for i in range(0, t):
	n = int(input())
	lista = []
	iter = 0
	x = int
	while n // 10 > 0:
		x = 0
		if n % 10 != 0 and iter != 0:
			x = n % 10 * 10 ** iter
		elif n % 10 != 0 and iter == 0:
			x = n % 10
		if x != 0:
			lista.append(x)
		n = n // 10
		iter += 1
	if n % 10 != 0 and iter != 0:
		x = n % 10 * 10 ** iter
	elif n % 10 != 0 and iter == 0:
		x = n % 10
	if x != 0:
		lista.append(x)
	print(len(lista))
	resp = map(str, lista)
	print(' '.join(resp))


for _ in range(int(input())):
	s = input()
	l = len(s)
	d = []
	for i in range(l):
		if s[-(i + 1)] != '0':
			d.append(int(s[-(i + 1)]) * 10 ** i)
	print(len(d))
	print(*d, sep=' ')


for _ in range(int(input())):
	n = int(input())
	(sum1, count) = (0, 0)
	li = []
	while n > 0:
		r = n % 10
		if r != 0:
			if sum1 != 0:
				for i in range(sum1):
					r *= 10
				if r != 0:
					li.append(r)
				count += 1
			else:
				li.append(r)
				count += 1
		n = n // 10
		sum1 += 1
	print(count)
	li.reverse()
	for i in li:
		print(i, end=' ')
	print()


n = int(input())
for i in range(n):
	k = input()
	print(len(k) - k.count('0'))
	print(' '.join([str(int(k[i]) * 10 ** (len(k) - i - 1)) for i in range(len(k)) if k[i] != '0']))


n = int(input())

def check(x):
	count = len(str(x))
	s = []
	div = 10
	for _ in range(count):
		r = x % div
		if r < 10 or r % 10 == 0:
			if r != 0:
				s.append(r)
		x = x - r
		div *= 10
	print(len(s))
	print(*s)
for _ in range(n):
	t = int(input())
	check(t)


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 10:
		print('1')
		print(n)
	else:
		cnt = 0
		for j in str(n):
			if j == '0':
				cnt += 1
		temp = len(str(n)) - 1
		print(len(str(n)) - cnt)
		for j in str(n):
			mul = 10 ** temp
			if j != '0':
				print(int(j) * mul, end=' ')
			temp -= 1
		print('')


for _ in range(int(input())):
	n = int(input())
	x = []
	s = str(n)
	l = len(s)
	if l == 1:
		print(1)
		print(n)
	else:
		c = 0
		for i in range(l - 1, -1, -1):
			if int(s[i]) != 0:
				k = ['0'] * c
				k = ''.join(k)
				h = s[i]
				h += k
				x.append(h)
			c += 1
		print(len(x))
		print(*x)


testCases = int(input())
for _ in range(testCases):
	n = input()
	length = len(n)
	answer = []
	for index in range(length):
		if n[index] != '0':
			answer.append(n[index] + '0' * (length - index - 1))
	print(len(answer))
	print(*answer)


tt = int(input())
for tests in range(tt):
	for ekbaar in range(1):
		n = str(input())
		a = []
		for _ in range(len(n)):
			if n[_] != 0:
				if int(n[_] + '0' * (len(n) - _ - 1)) != 0:
					a.append(n[_] + '0' * (len(n) - _ - 1))
		print(len(a))
		for _ in range(len(a) - 1):
			print(a[_], end=' ')
		print(a[-1])


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
t = inp()
for testcase in range(t):
	n = inp()
	o = []
	n = [int(x) for x in str(n)]
	ds = len(n)
	for i in range(ds):
		p = n[i] * 10 ** (ds - i - 1)
		if p != 0:
			o.append(p)
	print(len(o))
	print(*o)


n = int(input())
for i in range(n):
	s = input()
	a = []
	for j in range(len(s)):
		if int(s[j]) == 0:
			continue
		else:
			a.append(str(int(s[j]) * 10 ** (len(s) - 1 - j)))
	print(len(a))
	print(' '.join(a))


def myprint(n):
	i = 1
	j = 0
	res = ''
	while n >= 1:
		(q, r) = divmod(n, 10)
		n = q
		if r != 0:
			res += str(10 ** j * r) + ' '
		j += 1
	print(res[0:-1])
	return

def main():
	n = int(input())
	for x in range(n):
		k = input()
		print(len(k) - k.count('0'))
		myprint(int(k))
	return
main()


n = int(input())
for i in range(n):
	z = input()
	o = []
	for j in range(len(z)):
		if z[j] != '0':
			o.append(int(z[j]) * 10 ** (len(z) - 1 - j))
	o = [str(x) for x in o]
	print(len(o))
	print(' '.join(o))


def solver():
	n = input()
	p = len(n)
	res = []
	for ch in n:
		if ch != '0':
			res.append(str(int(ch) * 10 ** (p - 1)))
		p -= 1
	print(len(res))
	print(' '.join(res))

def main():
	t = int(input())
	for _ in range(t):
		solver()
main()


t = int(input(''))
t1 = t
while t1:
	t1 -= 1
	s = input('')
	c = 0
	l = []
	for i in range(len(s)):
		if s[i] != '0':
			c += 1
			f = len(s) - i - 1
			z = int(s[i])
			a = 10 ** f
			l.append(z * a)
	print(c)
	for e in l:
		print(e)


n = int(input())
for m in range(0, n):
	z = int(input())
	x = str(z)
	c = 0
	ls = []
	count = 0
	for i in range(len(x) - 1, -1, -1):
		if x[i] == 0:
			c = c + 1
		else:
			break
	if c == len(x) - 1:
		print(len(x))
		print(z)
	else:
		for j in range(len(x) - 1, -1, -1):
			if x[j] != '0':
				ls.append(int(x[j]) * 10 ** count)
			count = count + 1
		print(len(ls))
		for l in ls:
			print(int(l), end=' ')


t = int(input())
for _ in range(t):
	num = input()
	if len(num) == 1:
		print(1)
		print(num)
	else:
		n = len(num) - num.count('0')
		print(n)
		for (i, elem) in enumerate(num):
			if elem != '0':
				print(elem, end='')
				print('0' * (len(num) - i - 1), end=' ')
		print()


tc = int(input())
for zzz in range(tc):
	s = input()
	l = len(s)
	ans = []
	for i in range(l):
		num = s[i] + '0' * (l - 1 - i)
		if int(num) != 0:
			ans.append(num)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	a = []
	y = str(n)
	for j in range(len(y)):
		if y[j] != '0':
			a.append(y[j] + '0' * (len(y) - j - 1))
	print(len(a))
	print(*a)


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


i = int(input())
for _ in range(i):
	a = int(input())
	(i, sum, li) = (1, 0, [])
	while a > 0:
		rem = a % 10 ** i
		if rem != 0:
			sum += 1
			li.append(rem)
		a = a - rem
		i += 1
	print(sum)
	for b in li[:-1]:
		print(b, end=' ')
	print(li[-1])


T = int(input(''))

def round(sn, out, n):
	for a in range(len(sn)):
		if sn[-(a + 1)] != '0':
			out.append(''.join(sn[-(a + 1):]))
			n -= int(out[-1])
			return n

def solve(n):
	out = []
	while n != 0:
		sn = list(str(n))
		n = round(sn, out, n)
	return out
o = []
for a in range(T):
	o.append(solve(int(input(''))))
for a in o:
	print(len(a))
	print(' '.join(a))


t = int(input())
a = 10000
x = 0
lst = []
y = 0
for i in range(t):
	n = int(input())
	x = str(n)
	for i in range(len(x)):
		if len(x) == 1:
			y = 1
			lst = [n]
		elif x[i] != '0':
			y += 1
			lst.append(int(x[i]) * 10 ** (len(x) - i - 1))
	print(y)
	print(*lst)
	lst = []
	y = 0


t = int(input())
for i in range(t):
	n = input()
	op = []
	for j in range(len(n)):
		if n[len(n) - j - 1] == '0':
			continue
		else:
			op.append(int(n[len(n) - j - 1] + '0' * j))
	print(len(op))
	print(*op)


t = int(input())
for i in range(t):
	num = int(input())
	s = str(num)
	n = len(s)
	l = [int(i) for i in s]
	ans = []
	i = 0
	while i < n:
		if l[i] == 0:
			i += 1
		else:
			ans.append(l[i] * 10 ** (n - i - 1))
			i += 1
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print('')


def isRound(num_str):
	for i in range(1, len(num_str)):
		if num_str[i] != '0':
			return False
	return True
T = int(input())
for t in range(0, T):
	num_str = input()
	if isRound(num_str):
		print('1')
		print(num_str)
	else:
		list1 = []
		n = len(num_str)
		i = 0
		for i in range(0, n):
			temp = int(num_str[i])
			temp = temp * pow(10, n - i - 1)
			if temp != 0:
				list1.append(temp)
		print(len(list1))
		for item in list1:
			print(item, end=' ')
		print()


t = int(input())
for _ in range(t):
	s = str(input())
	a = []
	for i in range(len(s)):
		if not s[i] == '0':
			a.append(int(s[i]) * 10 ** (len(s) - i - 1))
	print(len(a), *a, sep='\n')


n1 = int(input())
for x in range(n1):
	n2 = int(input())
	arr = []
	mul = 1
	while n2 > 0:
		test = n2 % 10
		if test != 0:
			arr.append(test * mul)
		mul = mul * 10
		n2 = n2 // 10
	print(len(arr))
	for y in arr:
		print(y, end=' ')
	print('')


iterate = int(input())
for i in range(iterate):
	str_num = input()
	res_arr = []
	for s in range(len(str_num)):
		if str_num[s] != '0':
			res_arr.append(str_num[s] + '0' * (len(str_num) - 1 - s))
	print(len(res_arr))
	print(' '.join(res_arr))


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


def solve(x):
	i = 0
	n = 0
	nums = []
	while x > 0:
		if x % 10 != 0:
			nums.append(x % 10 * 10 ** i)
			n += 1
		i += 1
		x //= 10
	print(n)
	for k in nums[::-1]:
		print(k, end=' ')
	print('')
for _ in range(int(input())):
	x = int(input())
	solve(x)


t = int(input())
for k in range(t):
	n = int(input())
	output = []
	d = 1
	while n != 0:
		x = n % 10 * d
		if x != 0:
			output.append(x)
		n = n // 10
		d *= 10
	print(len(output))
	print(*output)


k = int(input())
for k0 in range(k):
	str = input()
	l = len(str)
	sp = []
	for i in range(len(str)):
		if str[i] != '0':
			sp.append(str[i] + '0' * (l - i - 1))
	print(len(sp), *sp)


from math import log10
t = int(input())
for i in range(t):
	n = input()
	ans = []
	i = 0
	d = int(log10(int(n)) + 1)
	while i < len(n):
		if n[i] != '0':
			x = ''
			x += n[i]
			for _ in range(d - i - 1):
				x += '0'
			ans.append(x)
		i += 1
	print(len(ans))
	i = 0
	while i < len(ans):
		if i > 0:
			print(' ', end='')
		print(ans[i], end='')
		i += 1
	print()


n = int(input())
for i in range(0, n):
	c = input()
	lists = []
	j = 1
	for i in range(len(c) - 1, -1, -1):
		result = int(c[i]) * j
		if result != 0:
			lists.append(result)
		j = j * 10
	print(len(lists))
	print(' '.join(map(str, lists)))


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	ans = []
	s = str(n)
	n = len(s)
	for i in range(len(s)):
		if s[i] != '0':
			tmp = s[i] + '0' * (n - 1 - i)
			ans.append(tmp)
	print(len(ans))
	print(*ans)


for i in range(int(input())):
	n = input()
	t = list(n)
	a = []
	b = []
	for i in range(len(t)):
		if t[i] == 0:
			continue
		else:
			p = int(t[i]) * 10 ** int(len(t) - int(i) - 1)
			a.append(p)
	s = ''
	for i in a:
		if i != 0 or i != 0 or i != 0 or (i != 0):
			b.append(i)
	print(len(b))
	for i in b:
		s = s + str(i) + ' '
	print(s)


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nlargest, nsmallest, _heapify_max, _heapreplace_max
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
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(var):
	sys.stdout.write(str(var))

def outln(var):
	sys.stdout.write(str(var) + '\n')

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return 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)]

def input_matrix():
	mat = []
	for i in range(5):
		mat.append(l())
round = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

def ans(n):
	temp = n
	i = 0
	res = []
	if n in round:
		res.append(n)
	else:
		while temp != 0:
			a = temp % 10
			temp = temp // 10
			if a != 0:
				res.append(a * 10 ** i)
			i += 1
	return res
t = int(data())
no = []
for i in range(t):
	no.append(int(data()))
for i in no:
	res = ans(i)
	print(len(res))
	for j in res:
		print(j, end=' ')
	print()


def solve(n):
	k = 0
	arr = []
	base = 1
	while n:
		if n % 10:
			arr.append(n % 10 * base)
			k += 1
		n //= 10
		base *= 10
	print(k)
	print(' '.join(list(map(str, arr))))
T = int(input())
for ti in range(1, T + 1):
	n = int(input())
	solve(n)


for _ in range(int(input())):
	a = input()
	v = []
	for i in range(len(a)):
		if int(a[i]) != 0:
			v.append(a[i] + '0' * len(a[i + 1:]))
	print(len(v))
	print(*v)


tc = int(input())
while tc:
	num = int(input())
	ans = []
	ik = 0
	while num != 0:
		if num % 10 == 0:
			ik += 1
			num = num // 10
			continue
		else:
			ans.append(num % 10 * int(pow(10, ik)))
		num = num // 10
		ik += 1
	print(len(ans))
	for hj in range(len(ans) - 1, -1, -1):
		print(ans[hj], end=' ')
	print()
	tc -= 1


def isZeroChar(sample):
	if sample == '0':
		return True
	else:
		return False
case = int(input())
for i in range(0, case):
	substring = []
	numbers = input()
	count = 1
	for letter in numbers:
		if not isZeroChar(letter):
			substring.append(letter + '0' * (len(numbers) - count))
		count += 1
	finishedList = ''
	for item in substring:
		finishedList = finishedList + item + ' '
	print(len(substring))
	print(finishedList)


for _ in range(int(input())):
	x = int(input())
	y = str(x)
	y = y[::-1]
	l = []
	for i in range(len(y)):
		z = int(int(y[i]) * pow(10, i))
		if z != 0:
			l.append(z)
	print(len(l))
	print(*l)


def findDig(n):
	string = ''
	num = 0
	i = 0
	while n != 0:
		dig = n % 10
		if dig != 0:
			string += str(dig * pow(10, i)) + ' '
			num += 1
		n = n // 10
		i += 1
	return (num, string)
for _ in range(int(input())):
	n = int(input())
	(num, string) = findDig(n)
	print(num)
	print(string)


l = '123456789'
for _ in range(int(input())):
	n = int(input())
	n = list(str(n))
	ans = []
	for i in range(len(n)):
		if n[i] in l:
			a = n[i] + '0' * (len(n) - i - 1)
			a = ''.join(a)
			ans.append(int(a))
	print(len(ans))
	print(*ans)


def rounding(num):
	numbers = []
	l = len(str(num))
	tmp = num
	for i in range(1, l + 1):
		fac = pow(10, i)
		r = tmp % fac
		if r > 0:
			numbers.append(r)
		tmp = tmp - r
	print(len(numbers))
	for i in numbers:
		print(i, end=' ')
	print()

def main():
	n = int(input())
	numbers = []
	for _ in range(n):
		numbers.append(int(input()))
	for i in numbers:
		rounding(i)
main()


t = int(input())
for _ in range(t):
	n = input()
	k = len(n) - n.count('0')
	print(k)
	if k == 1:
		print(n)
		continue
	n = int(n)
	i = 0
	while n != 0:
		rem = n % 10
		if rem != 0:
			print(rem * 10 ** i, end=' ')
		i += 1
		n //= 10
	print('')


t = int(input())
for _ in range(t):
	n = int(input())
	m = []
	if (n / 1000).is_integer() and n / 1000 > 0:
		m.append(n)
		n = n % 1000
	elif int(n / 1000) > 0:
		m.append(n // 1000 * 1000)
		n = n % 1000
	if (n / 100).is_integer() and n / 100 > 0:
		m.append(n)
		n = n % 100
	elif int(n / 100) > 0:
		m.append(n // 100 * 100)
		n = n % 100
	if (n / 10).is_integer() and n / 10 > 0:
		m.append(n)
		n = n % 10
	elif int(n / 10) > 0:
		m.append(n // 10 * 10)
		n = n % 10
	if int(n) > 0:
		m.append(int(n))
	print(len(m))
	print(*m)


cases = int(input())
full_list = [input() for i in range(cases)]

def round_finder(full_list):
	for i in full_list:
		string_list = [n for n in i]
		length = len(string_list) - 1
		x = 0
		while x < len(string_list):
			string_list[x] = string_list[x] + length * '0'
			x += 1
			length -= 1
		final_list = [i for i in string_list if int(i) != 0]
		print(len(final_list))
		print(' '.join(final_list))
round_finder(full_list)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	ans = []
	curr = ''
	s = list(inp())
	n = len(s)
	for i in range(n - 1, -1, -1):
		if s[i] != '0':
			ans.append(s[i] + curr)
		curr += '0'
	print(len(ans))
	print(*ans)
testcase(int(inp()))


t = int(input())
for x in range(t):
	p = 0
	a = list(input())
	l = len(a)
	for k in range(l):
		if a[k] != '0':
			p += 1
	print(p)
	for j in range(len(a)):
		if a[j] != '0':
			print(int(a[j]) * 10 ** (l - 1), end=' ')
		l -= 1
	print()


T = int(input())

def ans(n):
	l = len(n)
	ret = []
	for (i, d) in enumerate(n):
		if d == '0':
			continue
		ret += [d + '0' * (l - i - 1)]
	print(len(ret))
	print(' '.join(ret))
for t in range(T):
	n = input()
	ans(n)


def solve():
	x = input().strip()
	num = int(x)
	cnt = len(x) - 1
	i = 0
	rounds = 0
	arr = []
	while num > 0:
		if x[i] != '0':
			power = int(x[i]) * pow(10, cnt)
			arr.append(power)
			num %= power
			i += 1
			cnt -= 1
			rounds += 1
		else:
			i += 1
			cnt -= 1
	print(rounds)
	print(*arr)
t = int(input())
while t > 0:
	t -= 1
	solve()


def f(n):
	dec = 10
	u = 1
	count = 0
	res = []
	while n > 0:
		d = n % 10
		if d > 0:
			res.append(d * u)
			count += 1
		u *= 10
		n //= 10
	print(count)
	for x in res:
		print(x, end=' ')
	print()
N = int(input())
while N > 0:
	x = int(input())
	f(x)
	N -= 1


def solve():
	x = []
	ans = []
	l = list(input())
	for i in range(len(l)):
		x.append(l[i] + '0' * (len(l[i:]) - 1))
	for i in range(len(x)):
		if x[i][0] != '0':
			ans.append(x[i])
	print(len(ans))
	print(*ans)
t = int(input())
for i in range(t):
	solve()


t = int(input())
for _ in range(t):
	num = input()
	result = []
	cnt = 0
	for i in range(len(num) - 1, -1, -1):
		if num[i] == '0':
			pass
		else:
			result.append(int(num[i]) * pow(10, cnt))
		cnt += 1
	print(len(result))
	print(*result)


t = int(input())
while t > 0:
	n = input()
	l = len(n)
	ks = []
	for i in range(l):
		if n[i] != '0':
			ks.append(n[i] + '0' * (l - i - 1))
	print(len(ks))
	print(' '.join(ks))
	t -= 1


n = int(input())
for i in range(n):
	list = []
	num = input()
	l = len(num)
	p = 0
	if int(num) < 10:
		print(1)
		print(int(num))
	else:
		while int(num) >= 10 and p < l:
			if int(num[p]) != 0:
				c = int(num[p]) * 10 ** (l - 1 - p)
				list.append(c)
				p += 1
			else:
				p += 1
		print(len(list))
		for i in list:
			print(i, end=' ')


import math
test = int(input())
test_arr = []
for _ in range(test):
	arr = []
	a = int(input())
	dig = int(math.log(a, 10)) + 1
	for i in range(dig - 1, -1, -1):
		b = pow(10, i)
		s = int(a / b)
		if s > 0:
			arr.append(s * b)
		a = a % b
	test_arr.append(arr)
for t in test_arr:
	print(len(t))
	for i in t:
		print(i, end=' ')
	print('')


test_cases = int(input())
for case in range(test_cases):
	numbers = []
	number = input()
	for (index, i) in enumerate(number):
		if i != '0':
			numbers.append(i + '0' * (len(number) - index - 1))
	print(len(numbers))
	[print(i, end=' ') for i in numbers]
	print()


t = int(input())

def func(n):
	for j in range(n):
		s = input()
		sint = [int(char) for char in s]
		sint.reverse()
		su = [sint[i] * 10 ** i for i in range(len(sint))]
		sufinal = [ans for ans in su if ans != 0]
		print(len(sufinal))
		print(*sufinal, sep=' ')
func(t)


from math import *
n = int(input())
while n >= 1:
	k = int(input())
	m = 0
	q = str(k)
	l = []
	for a in range(len(q)):
		r = int(int(k % 10) * pow(10, m))
		if r != 0:
			l.append(r)
		k /= 10
		m += 1
	n -= 1
	print(len(l))
	for a in l:
		print(a, end=' ')
	print('\n')


t = int(input())
for tt in range(t):
	n = int(input())
	nl = [int(x) for x in str(n)]
	a = []
	count = 0
	l = len(nl)
	for i in range(l):
		if nl[i] != 0:
			a.append(nl[i] * 10 ** (l - i - 1))
			count += 1
	print(count)
	for aa in a:
		print(aa, end=' ')


import math
for _ in range(int(input())):
	n = int(input())
	ans = 0
	a = []
	i = 0
	while n > 0:
		ans += 1
		if n % 10 != 0:
			a.append(int(n % 10 * math.pow(10, i)))
		n = n // 10
		i += 1
	print(len(a))
	for i in a:
		print(i, end=' ')
	print()


from sys import stdin, gettrace
if not gettrace():

	def input():
		return next(stdin)[:-1]

def main():

	def solve():
		n = input()
		res = []
		for i in range(len(n)):
			if n[i] != '0':
				res.append(n[i] + '0' * (len(n) - i - 1))
		print(len(res))
		print(' '.join(res))
	q = int(input())
	for _ in range(q):
		solve()
main()


for y in range(int(input())):
	n = input()
	lst = []
	l = len(n)
	while l > 0:
		st = n[0:1] + '0' * (l - 1)
		if st[0:1] != '0':
			lst.append(st)
		n = n[1:]
		l -= 1
	print(len(lst))
	print(' '.join(lst))


from sys import stdin, stdout

def solve(string):
	res = []
	for i in reversed(range(0, len(string))):
		if string[i] != '0':
			ans = int(string[i]) * 10 ** (len(string) - (i + 1))
			res.append(str(ans))
	stdout.write(f'{len(res)}\n')
	for i in reversed(range(0, len(res))):
		if i == 0:
			stdout.write(f'{res[i]}\n')
		else:
			stdout.write(f'{res[i]} ')
t = int(stdin.readline())
for _ in range(t):
	solve(stdin.readline().strip())


n = int(input())
for i in range(n):
	k = input()
	br = 0
	l = []
	for j in range(len(k)):
		if k[j] != '0':
			m = len(k) - 1 - j
			l.append(k[j] + '0' * m)
			br += 1
	print(br)
	print(' '.join(l))


test_cases = int(input())
for _ in range(test_cases):
	num = int(input())
	length = len(str(num))
	no_of_non_zero = 0
	for digit in str(num):
		if digit != '0':
			no_of_non_zero += 1
	print(no_of_non_zero)
	for (i, digit) in enumerate(str(num)):
		if digit != '0':
			print(int(digit) * 10 ** (length - i - 1), end=' ')
	print('')


def ans(n):
	lis = []
	l = len(n)
	for i in range(l):
		if n[i] != '0':
			lis.append(n[i] + '0' * (l - 1 - i))
	print(len(lis))
	print(*lis)
for i in range(int(input())):
	ans(input())


t = int(input())
for _ in range(t):
	number = input()
	n = len(number)
	nums = []
	count = 0
	for (i, num) in enumerate(number):
		if num == '0':
			continue
		count += 1
		nums.append(int(num) * 10 ** (n - i - 1))
	print(count)
	print(' '.join([str(i) for i in nums]))


def addends(n):
	str1 = str(n)
	list1 = [x for x in str1 if x != '0']
	return len(list1)
t = int(input())
num = []
for x in range(t):
	num.append(int(input()))
k = []
res = []
for x in range(t):
	y = addends(num[x])
	k.append(y)
for x in range(t):
	count = 0
	str2 = str(num[x])
	list2 = [x for x in str2]
	for y in range(len(list2)):
		if list2[y] != '0' and y != len(list2) - 1:
			res.append(int(list2[y]) * 10 ** (len(list2) - y - 1))
		elif list2[y] != '0' and y == len(list2) - 1:
			res.append(int(list2[y]))
for x in range(t):
	print('\n', k[x], sep='')
	i = 0
	while i < k[x]:
		print(res[0], end=' ')
		res.pop(0)
		i += 1


t = int(input())
i = 0
while i < t:
	n = int(input())
	count = 0
	j = 1
	result = []
	while n > 0:
		if n % 10 != 0:
			result.append(n % 10 * j)
		n = n // 10
		j = j * 10
	print(len(result))
	for x in result:
		if x != 0:
			print(x, end=' ')
	print()
	i = i + 1


for i in range(int(input())):
	x = input()
	m = int(x)
	if len(x) == 1:
		print(1)
		print(int(x))
	else:
		z = []
		while m != 0:
			n = m % int('1' + '0' * (len(x) - 1))
			z.append(m - n)
			m = n
			x = str(m)
		print(len(z))
		print(*z)


k = int(input())
s = []
for i in range(k):
	n = int(input())
	n1 = list(str(n))
	for i in range(len(n1)):
		if n % 10 != 0:
			s.append(n % 10 * 10 ** i)
		n = n // 10
	print(len(s))
	print(*s)
	s = []


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def pat(n):
	return n * (3 * n + 1) // 2

def foo():
	x = inp()
	mod = 10
	lst = []
	lst1 = []
	while x != 0:
		st = x % mod
		lst.append(st)
		x -= st
		mod = mod * 10
	for item in lst:
		if item == 0:
			continue
		else:
			lst1.append(item)
	print(len(lst1))
	for i in range(len(lst1) - 1):
		print(lst1[i], end=' ')
	print(lst1[-1])
t = inp()
for i in range(t):
	foo()


t = int(input())
for _ in range(t):
	n = int(input())
	my = []
	if n % 10 != 0:
		my.append(n % 10)
	ans = n % 10
	n -= ans
	if n % 100 != 0:
		my.append(n % 100)
	ans = n % 100
	n -= ans
	if n % 1000 != 0:
		my.append(n % 1000)
	ans = n % 1000
	n -= ans
	if n % 10000 != 0:
		my.append(n % 10000)
	if n >= 10000 and n % 10000 == 0:
		my.append(n)
	print(len(my))
	for i in my:
		print(i, end=' ')
	print()


t = int(input())
for T in range(t):
	n = str(input())
	num = 0
	l = list(n)
	final = []
	du = len(l)
	for i in l:
		if i != '0':
			num += 1
			temp = int(i) * 10 ** (du - 1)
			final.append(temp)
		du -= 1
	print(num)
	for j in final:
		print(j, end=' ')
	print()


n = int(input())
k = 0
for i in range(n):
	a = input()
	print(len(a) - a.count('0'))
	for i in range(len(a)):
		if int(a[i]) == 0:
			continue
		print(int(a[i]) * pow(10, len(a) - i - 1), end=' ')
	print('\n')


for _ in range(int(input())):
	n = int(input())
	i = 0
	non_zero = 0
	print(len(str(n).replace('0', '')))
	while n != 0:
		if n % 10 != 0:
			print(n % 10 * 10 ** i, end=' ')
			non_zero += 1
		n = n // 10
		i += 1
	print()


T = int(input())
for j in range(T):
	n = input()
	n1 = len(n)
	l = []
	for i in range(n1):
		if n[i] != '0':
			l.append(n[i] + '0' * (n1 - int(i) - 1))
	print(len(l))
	for i in l:
		print(i, end=' ')
	print(' ')


def digit(n):
	l = []
	t = 0
	while n > 0:
		if n % 10 != 0:
			t += 1
		l.append(n % 10)
		n //= 10
	return (l, t)
for _ in range(int(input())):
	n = int(input())
	(l, k) = digit(n)
	t = 1
	print(k)
	for i in range(len(l)):
		if l[i] != 0:
			print(t * l[i], end=' ')
		t *= 10
	print()


t = int(input())
while t > 0:
	n = int(input())
	str1 = [int(i) for i in list(str(n))]
	count1 = len(str1) - str1.count(0)
	print(count1)
	str2 = ''
	for i in range(len(str1)):
		if str1[i] != 0:
			str2 += str(str1[i] * 10 ** (len(str1) - i - 1)) + ' '
	if str2 != '':
		print(str2[:-1])
	t -= 1


a = int(input())
x = []
for i in range(a):
	d = []
	q = input()
	b = []
	z = len(q)
	for j in range(z):
		b.append(int(q[j]))
	for j in range(z):
		if b[j] != 0:
			m = b[j] * 10 ** (z - j - 1)
			if m != 0:
				d.append(m)
	x.append(d)
for i in range(a):
	print(len(x[i]))
	print(*x[i])


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


for i in range(int(input())):
	n = input()
	d = {len(n) - i - 1: n[i] for i in range(len(n))}
	print(sum((1 for i in d if d[i] != '0')))
	for i in d:
		if d[i] != '0':
			print(d[i] + '0' * i)


def solve(c):
	tam = len(c)
	ans = []
	for i in range(0, tam):
		if c[i] != '0':
			ans.append(c[i] + '0' * (tam - 1 - i))
	print(len(ans))
	print(' '.join(ans))

def inp():
	c = int(input())
	for i in range(c):
		x = input()
		solve(x)
inp()


for i in range(int(input())):
	n = int(input())
	s = str(n)
	print(len(s) - s.count('0'))
	if len(s) - 1 == s.count('0'):
		print(n)
	else:
		for j in range(len(s) - s.count('0')):
			if s[len(s) - 1] != 0:
				print(int(s[0]) * pow(10, len(s) - 1), end=' ')
			n = n - int(s[0]) * pow(10, len(s) - 1)
			s = str(n)
		print()


t = int(input())
for _ in range(t):
	n = int(input())
	s = str(n)
	ans = []
	s = reversed(s)
	for (i, c) in enumerate(s):
		v = int(c) * 10 ** i
		if v:
			ans.append(v)
	print(len(ans))
	print(' '.join((str(x) for x in ans)))


def solve(a):
	s = ''
	t = 0
	lst = []
	n = 1
	while n < a:
		n = n * 10
	n = n // 10
	if n == 0:
		n = 1
	while a > 0:
		x = a - a % n
		if x != 0:
			t = t + 1
			lst.append(x)
		a = a % n
		n = n // 10
	print(t)
	for m in lst:
		s = s + str(m) + ' '
	print(s[:-1])
n = int(input())
for i in range(n):
	solve(int(input()))


t = int(input())
while t > 0:
	n = int(input())
	s = len(str(n))
	c = 0
	l = []
	g = s - 1
	if n % 10 ** (s - 1) == 0 or s == 1:
		print(1)
		print(n)
	else:
		for i in range(g):
			f = n % 10 ** (s - 1)
			n = n // 10 ** (s - 1)
			a = len(str(f))
			l.append(n * 10 ** (s - 1))
			n = f
			if f % 10 ** (a - 1) == 0 or len(str(f)) == 1:
				c += 1
				l.append(f)
				c += 1
				break
			else:
				c += 1
				s = a
		print(c)
		print(' '.join(map(str, l)))
	t -= 1


t = int(input())
while t:
	n = int(input())
	temp = n
	res = 0
	while temp != 0:
		rem = temp % 10
		temp = temp // 10
		if rem != 0:
			res += 1
	print(res)
	temp = n
	multiplier = 1
	while temp != 0:
		rem = temp % 10
		temp = temp // 10
		if rem != 0:
			print(rem * multiplier, end=' ')
		multiplier *= 10
	print()
	t -= 1


for _ in range(int(input())):
	n = input()
	req = []
	c = len(n)
	for i in range(len(n)):
		c -= 1
		if n[i] != '0':
			req.append(n[i] + '0' * c)
	print(len(req))
	for i in req:
		print(i, end=' ')
	print()


numonums = input()
(k, j) = (0, 0)
listofroundnums = []
for i in range(0, int(numonums)):
	listofroundnums = []
	num = list(input())
	(k, j) = (int(len(num)), int(len(num)))
	for l in num:
		j -= 1
		if l == '0':
			k -= 1
		else:
			listofroundnums.append(str(l) + j * '0')
	print(k)
	print(' '.join(listofroundnums))


t = int(input())
for _ in range(t):
	n = int(input())
	temp = str(n)
	if n % 10 ** len(temp) == 0:
		print(1)
		print(n)
		continue
	array = []
	i = 0
	while n != 0:
		rem = n % 10
		temp2 = rem * 10 ** i
		if temp2 != 0:
			array.append(temp2)
		n = n // 10
		i += 1
	print(len(array))
	for x in array:
		print(x, end=' ')
	print()


for _ in range(int(input())):
	n = input()
	j = 0
	ans = []
	for i in n:
		if i == '0':
			j += 1
			continue
		ans.append(i + '0' * (len(n) - j - 1))
		j += 1
	print(len(ans))
	print(*ans)


kk = '123456789'

def new_func():
	n = input()
	l = len(n)
	s = ''
	j = 0
	if l == 1:
		print(1)
		print(n)
	else:
		for i in range(len(n)):
			if n[i] in kk:
				s += n[i] + '0' * (l - i - 1) + ' '
				j += 1
		print(j)
		print(s)
for i in range(int(input())):
	new_func()


for i in range(int(input())):
	n = int(input())
	i = 0
	j = 1
	ans = []
	while n != 0:
		if n % 10 == 0:
			n = n // 10
			j *= 10
			continue
		else:
			ans.append(n % 10 * j)
			n = n // 10
			j *= 10
			i += 1
	print(i)
	for item in ans:
		print(item, end=' ')


t = int(input())
for i in range(t):
	a = input()
	l = []
	s = ''
	if len(a) == 5:
		l.append(a[0] + '0000')
		l.append(a[1] + '000')
		l.append(a[2] + '00')
		l.append(a[3] + '0')
		l.append(a[4])
	if len(a) == 4:
		l.append(a[0] + '000')
		l.append(a[1] + '00')
		l.append(a[2] + '0')
		l.append(a[3])
	elif len(a) == 3:
		l.append(a[0] + '00')
		l.append(a[1] + '0')
		l.append(a[2])
	elif len(a) == 2:
		l.append(a[0] + '0')
		l.append(a[1])
	elif len(a) == 1:
		l.append(a[0])
	count = 0
	l.reverse()
	for i in l:
		if int(i) != 0:
			count += 1
			s = s + i + ' '
	print(count)
	print(s)


t = int(input())
for i in range(t):
	n = input()
	lst = []
	ln = len(n)
	for j in range(ln):
		if n[j] != '0':
			lst.append(n[j] + (ln - j - 1) * '0')
		else:
			lst.append(n[j])
	c = n.count('0')
	for j in range(c):
		lst.remove('0')
	print(len(lst))
	for i in lst:
		print(i, end=' ')


import copy
t = int(input())
for T in range(t):
	n = input()

	def solve(x):
		ret = []
		for i in range(len(x)):
			if x[i] == '0':
				continue
			ret.append(x[i] + '0' * (len(x) - i - 1))
		return ret
	ans = solve(n)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		N = int(input())
		(ans1, ans2) = (0, [])
		for i in range(1, 6):
			n = N % 10 ** i
			if not n:
				continue
			ans2.append(n)
			ans1 += 1
			N -= n
			if not N:
				print(ans1)
				print(*ans2)
				break
main()


t = int(input())
for _ in range(t):
	x = int(input())
	l = []
	amari = x
	while True:
		x = amari
		ln = len(str(amari))
		div = int(str(amari)[0]) * 10 ** (ln - 1)
		if div == 0:
			print(len(l))
			print(' '.join(map(str, l)))
			break
		else:
			amari = x % div
			x -= amari
			l.append(x)


import sys
input = sys.stdin.readline
output = sys.stdout.write

def main():
	length = int(input().rstrip())
	for i in range(length):
		num = input().rstrip()
		partial = num[1:]
		lenn = len(partial)
		if len(num) == 1 or partial == '0' * lenn:
			output('1' + '\n')
			output(num)
			output('\n')
		else:
			counter = 0
			st = ''
			st += num[0] + '0' * lenn
			counter += 1
			for j in partial:
				if j != '0':
					st += ' ' + j + '0' * (lenn - 1)
					counter += 1
				lenn -= 1
			output(str(counter) + '\n')
			output(st)
			output('\n')
main()


for _ in ' ' * int(input()):
	n = int(input())
	lst = []
	cnt = 0
	while n:
		d = n % 10
		n = n // 10
		if d != 0:
			lst.append(str(d) + '0' * cnt)
		cnt += 1
	print(len(lst))
	print(*lst)


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

def read_ints():
	ints = [int(x) for x in input().split(' ')]
	return ints

def solve(n):
	s = str(n)
	l = len(s)
	sol = []
	for i in range(l):
		val = s[i]
		if val != '0':
			si = val + '0' * (l - i - 1)
			sol.append(si)
	return sol
t = read_int()
for case in range(t):
	n = read_int()
	sol = solve(n)
	print(len(sol))
	print(' '.join(sol))


def count(n):
	if n < 10:
		return 1
	else:
		return 1 + count(int(n / 10))

def compute(n):
	if count(n) == 1:
		print(1)
		print(n)
		return
	if n % 10 ** count(n) == 0:
		print(1)
		print(n)
		return
	(j, l) = (1, [])
	for i in range(count(n)):
		m = n % 10 * j
		if m != 0:
			l.append(m)
		n //= 10
		j *= 10
	print(len(l))
	for i in l:
		print(i, end=' ')
	return
testcases = int(input())
for i in range(testcases):
	compute(int(input()))


n = int(input())
lb = []
for i in range(n):
	n2 = int(input())
	s = str(n2)
	l = [int(s[len(s) - 1])]
	for i in range(1, len(s)):
		x = int(s[len(s) - 1 - i]) * 10 ** i
		l = l + [x]
	lb = lb + [l]
for i in range(0, len(lb)):
	lb[i] = list(set(lb[i]))
	if 0 in lb[i]:
		lb[i].remove(0)
	print(len(lb[i]))
	sg = ''
	for j in lb[i]:
		sg = sg + str(j) + ' '
	print(sg)


def round_num(n):
	s = str(n)
	l = []
	if len(s) == 1 or set(s[1:]) == set('0'):
		print('1')
		print(n)
		return
	else:
		k = 10
		while n != 0:
			rem = n % k
			if rem:
				l.append(rem)
				n //= k
				n *= k
			k *= 10
		print(len(l))
		print(*l, sep=' ')
		return
t = int(input())
for _ in range(t):
	n = int(input())
	round_num(n)


t = int(input())
for i in range(t):
	n = int(input())
	q = list()
	while n != 0:
		p = len(str(n)) - 1
		l = 10 ** p
		q.append(n // l * l)
		n = n % l
	print(len(q))
	for j in q:
		print(j, end=' ')
	print()


import sys, re, math
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from heapq import heappush, heappop, heapify, nlargest, nsmallest

def STR():
	return list(input())

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

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

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def sortListWithIndex(listOfTuples, idx):
	return sorted(listOfTuples, key=lambda x: x[idx])

def sortDictWithVal(passedDic):
	temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
	toret = {}
	for tup in temp:
		toret[tup[0]] = tup[1]
	return toret

def sortDictWithKey(passedDic):
	return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
t = INT()
while t != 0:
	n = input()
	k = 0
	l = []
	for (i, ch) in enumerate(n):
		if ch != '0':
			l.append(int(ch) * 10 ** (len(n) - i - 1))
			k += 1
	print(k)
	print(*l)
	t -= 1


t = int(input())
for test in range(t):
	n = int(input())
	n2 = n
	result = 0
	exp = 1
	while n != 0:
		if n % 10 != 0:
			result += 1
		n //= 10
	print(result)
	while n2 != 0:
		if n2 % 10 != 0:
			print(n2 % 10 * exp, end=' ')
		n2 //= 10
		exp *= 10
	print()


t = int(input())
while t != 0:
	t -= 1
	k = 0
	a1 = 0
	b1 = 0
	c1 = 0
	d1 = 0
	n = int(input())
	a = n % 10
	if a != 0:
		k += 1
		a1 = a
	b = n // 10 % 10
	if b != 0:
		k += 1
		b1 = 10 * b
	c = n // 100 % 10
	if c != 0:
		k += 1
		c1 = 100 * c
	d = n // 1000
	if d != 0:
		k += 1
		d1 = 1000 * d
	print(k)
	if a1 != 0:
		print(a1, end=' ')
	if b1 != 0:
		print(b1, end=' ')
	if c1 != 0:
		print(c1, end=' ')
	if d1 != 0:
		print(d1, end=' ')
	print()


t = int(input())
for i in range(t):
	n = int(input())
	summands = []
	c = 0
	while n > 0:
		import math
		if int(n % 10) * 10 ** c > 0:
			summands.append(int(n % 10) * 10 ** c)
		n //= 10
		c += 1
	print(len(summands))
	print(' '.join([str(x) for x in summands]))


n = int(input())
for _ in range(n):
	a = []
	m = input()
	for (i, v) in enumerate(reversed(m)):
		if v != '0':
			for _ in range(i):
				v += '0'
			a.append(v)
	print(len(a))
	for x in a:
		print(x, end=' ')
	print()


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


import math
t = int(input())
while t > 0:
	n = int(input())
	c = []
	while n > 0:
		x = n % 10
		c.append(x)
		n = n // 10
	print(len(c) - c.count(0))
	for i in range(len(c)):
		if c[i] != 0:
			j = int(math.pow(10, i))
			print(c[i] * j, end=' ')
	print()
	t = t - 1


for _ in range(int(input())):
	n = input()
	l = []
	if len(n) == 1:
		print('1')
		print(n)
	elif int(n[1:len(n)]) != 0:
		count = 0
		for i in range(len(n) - 1, -1, -1):
			if n[i] == '0':
				count += 1
			else:
				x = int(n[i]) * 10 ** count
				l.append(str(x))
				count += 1
		print(len(l))
		print(' '.join(l))
	else:
		print('1')
		print(n)


n = int(input())
for i in range(n):
	t = int(input())
	if t < 10:
		li = [t]
		print(len(li))
		print(t)
	elif t < 100:
		if t % 10 == 0:
			print(1)
			print(t)
		else:
			A = t % 10
			B = t % 100 - A
			li = [B, A]
			print(len(li))
			print(B, A)
	elif t < 1000:
		A = t % 10
		B = t % 100 - A
		C = t % 1000 - A - B
		if t % 100 == 0:
			print(1)
			print(t)
		elif t % 10 == 0:
			print(2)
			print(C, B)
		elif (t - A) % 100 == 0:
			print(2)
			print(C, A)
		else:
			li = [A, B, C]
			print(len(li))
			print(C, B, A)
	elif t <= 10000:
		A = t % 10
		B = t % 100 - A
		C = t % 1000 - A - B
		D = t % 10000 - A - B - C
		if t == 10000:
			print(1)
			print(t)
		elif t % 1000 == 0:
			print(1)
			print(t)
		elif t % 100 == 0:
			print(2)
			print(D, C)
		elif t % 10 == 0:
			if (t - B) % 1000 == 0:
				print(2)
				print(D, B)
			else:
				print(3)
				print(D, C, B)
		elif (t - A) % 100 == 0:
			if (t - A) % 1000 == 0:
				print(2)
				print(D, A)
			else:
				print(3)
				print(D, C, A)
		elif (t - B - A) % 1000 == 0:
			print(3)
			print(D, B, A)
		else:
			li = (A, B, C, D)
			print(len(li))
			print(D, C, B, A)
	else:
		print('out')


t = int(input())
for _ in range(t):
	n = int(input())
	sn = str(n)
	ansl = []
	for i in range(len(sn)):
		ch = sn[i]
		if ch != '0':
			st = ch + (len(sn) - i - 1) * '0'
			ist = int(st)
			ansl.append(ist)
	print(len(ansl))
	print(*ansl)


def solve():
	n = input()[::-1]
	k = len(str(n))
	v = 0
	final = ''
	for i in range(0, k):
		if n[i] != '0':
			final += str(10 ** i * int(n[i])) + ' '
			v += 1
	print(v)
	print(final)
t = int(input())
for tt in range(1, t + 1):
	solve()


x = int(input())
l = []
s = []
d = 1000
for i in range(x):
	l.append(int(input()))
for i in range(x):
	s = []
	for j in range(9):
		if l[i] < 10 and l[i] > 0:
			s.append(l[i])
			break
		elif l[i] >= 1000:
			c = l[i] % 1000
			s.append(l[i] - c)
			l[i] = c
		elif l[i] >= 100 and l[i] < 1000:
			c = l[i] % 100
			s.append(l[i] - c)
			l[i] = c
		elif l[i] < 100 and l[i] >= 10:
			c = l[i] % 10
			s.append(l[i] - c)
			l[i] = c
	print(len(s))
	print(*s)


for _ in range(int(input())):
	n = int(input())
	l = []
	c = d = 0
	s = ''
	while n:
		if n % 10 != 0:
			s = str(n % 10) + '0' * c
			l.append(s)
			d += 1
		n = n // 10
		c += 1
	print(d)
	for i in range(len(l)):
		if i != len(l) - 1:
			print(l[i], end=' ')
		else:
			print(l[i])


for _ in range(int(input())):
	n = int(input())
	i = 0
	ans = []
	while n > 0:
		a = n % 10
		n //= 10
		if a == 0:
			i += 1
			continue
		ans.append(10 ** i * a)
		i += 1
	print(len(ans))
	for j in ans[::-1]:
		print(j, end=' ')


for _ in range(int(input())):
	x = input()
	arr = []
	z = len(x)
	for i in range(z):
		if x[i] != '0':
			arr.append(int(x[i]) * 10 ** (z - i - 1))
	print(len(arr))
	print(*arr)


def func(k):
	l = []
	k1 = 0
	k2 = 0
	while k != 0:
		if k % 10 != 0:
			l.append(k % 10 * 10 ** k1)
			k2 += 1
		k1 += 1
		k = k // 10
	print(k2)
	for i in l:
		print(i, end=' ')
	print()
n = int(input())
for i in range(n):
	func(int(input()))


t = int(input())
for i in range(t):
	n = input()
	ls = []
	lenn = len(n)
	for j in range(lenn):
		if n[j] != '0':
			ls.append(n[j] + '0' * (lenn - j - 1))
	print(len(ls))
	print(*ls)


for _ in range(int(input())):
	n = input()
	y = len(n)
	li = []
	for x in n:
		y -= 1
		if int(x) * 10 ** y > 0:
			li.append(int(x) * 10 ** y)
	print(len(li))
	for x in li:
		print(x, end=' ')
	print()


import sys
from math import ceil
read = sys.stdin.buffer.readline
mi = lambda : map(int, read().split())
li = lambda : list(mi())
cin = lambda : int(read())
ans = 1
(la, lb) = (1, 1)
for _ in range(cin()):
	n = input()
	ans = []
	pw = pow(10, len(n) - 1)
	for i in range(len(n)):
		if n[i] != '0':
			ans.append(pw * int(n[i]))
		pw //= 10
	print(len(ans))
	for el in ans:
		print(el, end=' ')
	print()


t = int(input())
while t:
	n = int(input())
	ans = []
	fl = 1
	while n > 0:
		if n % 10 > 0:
			ans.append(n % 10 * fl)
		n = int(n / 10)
		fl = fl * 10
	print(len(ans))
	for z in ans:
		print(z, end=' ')
	print()
	t -= 1


t = int(input())
for i in range(t):
	n = input()
	L = list(n)
	l = len(L)
	ch = ' '
	for j in range(l):
		if L[j] != '0':
			ch = ch + L[j] + '0' * (l - 1 - j) + ' '
	c = ch.count(' ') - 1
	ch = ch[1:len(ch) - 1]
	print(c)
	print(ch)


tc = int(input())
while tc != 0:
	tc = tc - 1
	n = int(input())
	s = len(str(n))
	a = []
	for i in reversed(range(s)):
		d = int(str(n)[i])
		if d != 0:
			x = 10 ** (s - (i + 1)) * d
			a.append(x)
	print(len(a))
	for i in a:
		print(i, end=' ')
	print()


from sys import stdout, stdin
(_input, _print) = (stdin.buffer.readline, stdout.write)
(_range, _len, _int) = (range, len, int)

def solution():
	for _ in _range(_int(_input())):
		n = _int(_input())
		counter = 1
		ans = []
		while n // 10 != 0:
			if n % 10 != 0:
				ans.append(n % 10 * counter)
			n //= 10
			counter *= 10
		ans.append(n % 10 * counter)
		print(_len(ans))
		print(*ans)
solution()


n = int(input())
for x in range(n):
	x = int(input())
	a = list(map(int, str(x)))
	b = len(str(x))
	c = pow(10, b - 1)
	count = 0
	for y in range(b):
		if a[y] != 0:
			count += 1
	print(count)
	for y in range(b):
		if a[y] != 0:
			print(int(a[y] * c), end=' ')
		c /= 10


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


t = int(input())
for _ in range(t):
	alle = []
	zahl = int(input())
	i = 0
	while zahl != 0:
		ja = zahl % 10
		if ja != 0:
			alle.append(int(str(ja) + i * '0'))
		zahl = int(zahl / 10)
		i += 1
	print(len(alle))
	print(' '.join([str(c) for c in alle[::-1]]))


T = int(input())
for t in range(T):
	n = int(input())
	lst = []
	d = 0
	while n > 0:
		if n % 10 != 0:
			lst.append(n % 10 * 10 ** d)
		n = n // 10
		d += 1
	print(len(lst))
	print(*lst)


t = int(input())
for i in range(t):
	n = int(input())
	b = 10 ** (len(str(n)) - 1)
	a = []
	c = 0
	while n > 0:
		if n % b >= 0:
			a.append(n - n % b)
			n = n % b
			c += 1
			b = 10 ** (len(str(n)) - 1)
	print(c)
	print(*a)


T = int(input())
for tc in range(T):
	n = input()
	n = n[::-1]
	l1 = []
	for i in range(len(n)):
		if int(n[i]) > 0:
			l1.append(int(n[i]) * 10 ** i)
	print(len(l1))
	print(*l1)


n_nums = int(input())
for _ in range(n_nums):
	number = int(input())
	number_str = str(number)
	print(len(number_str) - number_str.count('0'))
	for i in range(len(number_str)):
		if number_str[i] != '0':
			print(int(number_str[i]) * 10 ** (len(number_str) - i - 1))


for _ in range(int(input())):
	n = int(input())
	k = 10
	ans = []
	while n * 10 // k != 0:
		if n % k != 0:
			ans.append(str(n % k))
		n -= n % k
		k *= 10
	print(len(ans))
	print(' '.join(ans))


t = int(input())
for i in range(t):
	b = []
	a = int(input())
	while a > 0:
		b.append(a % 10)
		a = a // 10
	ans = []
	for i in range(len(b)):
		ans.append(b[i] * 10 ** i)
	ans = [x for x in ans if x != 0]
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print()


t = int(input())
numArr = []

def isRound(num):
	num = str(num)
	for i in range(1, len(num)):
		if num[i] != '0':
			return False
	return True
for i in range(t):
	numArr.append(int(input()))
for i in range(t):
	if isRound(numArr[i]):
		count = 1
		print(count)
		print(numArr[i])
	else:
		count = 1
		roundNumsStr = ''
		while isRound(numArr[i]) == False:
			strNum = str(numArr[i])
			numToSub = ''
			numToSub += strNum[0]
			for j in range(1, len(strNum)):
				numToSub += '0'
			numToSub = int(numToSub)
			roundNumsStr += str(numToSub) + ' '
			numArr[i] = numArr[i] - numToSub
			count += 1
		print(count)
		print(roundNumsStr + str(numArr[i]))


t = int(input())
for k in range(t):
	n = input()
	cnt = su = 0
	spls = []
	for i in n:
		if i != '0':
			su += 1
			spls.append(str(i) + '0' * (len(n) - cnt - 1))
		cnt += 1
	print(su)
	for i in spls:
		print(i, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = int(input())
	k = len(str(n))
	L = []
	for i in range(k):
		r = n % 10
		if r != 0:
			L.append(r * 10 ** i)
		n //= 10
	L.reverse()
	print(len(L))
	for i in range(len(L)):
		if L[i] != 0:
			print(L[i], end=' ')
	print()


a = []
for _ in range(int(input())):
	n = input()
	if {'0'} == set(n[1:]):
		a.append(n)
	else:
		for i in range(len(n)):
			if n[i] != '0':
				a.append(n[i] + '0' * (len(n) - 1 - i))
	print(len(a))
	print(' '.join(a))
	a = []


t_count = int(input().strip())
while t_count > 0:
	num = input().strip()
	len_num = len(num)
	r_num = []
	for i in range(len_num):
		if num[i] != '0':
			zero = '0' * (len_num - i - 1)
			r_num.append(num[i] + zero)
	print(len(r_num))
	print(' '.join(r_num))
	t_count -= 1


def diver(x):
	le = len(x)
	l = []
	c = 0
	for i in range(le):
		if x[i] != '0':
			l.append(x[i] + (le - i - 1) * '0')
	print(len(l))
	print(*l)
n = int(input())
for i in range(n):
	diver(input())


for _ in range(int(input())):
	number = int(input())
	count = 0
	roundNumbers = []
	while number:
		roundNumbers.append(number % 10 * 10 ** count)
		number = number // 10
		count += 1
	filtered = list(filter(0 .__ne__, roundNumbers))
	print('{}'.format(len(filtered)))
	for i in filtered:
		print(i, end=' ')
	print('\n')


t = int(input())
x = []
ans = []
for i in range(t):
	x.append(str(input()))
for i in x:
	if int(i) > 0 and int(i) <= 10:
		print(1)
		print(i)
	else:
		for j in range(1, len(i) + 1):
			if i[-j] != '0':
				ans.append(str(int(i[-j]) * 10 ** (j - 1)))
		if len(ans) > 0:
			print(len(ans))
			print(' '.join(ans))
			ans = []


T = int(input())
for t in range(T):
	N = int(input())
	n = str(N)
	numbers = []
	for (i, c) in enumerate(n):
		if c == '0':
			continue
		numbers.append(c + '0' * (len(n) - 1 - i))
	print(len(numbers))
	print(' '.join(numbers))


for _ in range(int(input())):
	n = input()
	l = len(n)
	n = n.rstrip('0')
	i = 0
	ans = []
	while i < len(n):
		if n[i] != '0':
			power = 10 ** (l - 1 - i)
			ans.append(int(n[i]) * power)
		i += 1
	print(len(ans))
	print(*ans)


size = int(input())
ls = []
for i in range(size):
	vlu = input()
	x = int(vlu)
	incre = 1
	lngth = len(vlu)
	while lngth != -1:
		rem = int(x % 10 * incre)
		x = int(x / 10)
		if rem > 0:
			ls.append(rem)
		lngth -= 1
		incre *= 10
	print(len(ls))
	for i in ls:
		print(i, end=' ')
	print()
	ls.clear()


t = int(input())
for _ in range(t):
	n = int(input())
	sol = []
	m = 1
	while n:
		if n % 10:
			sol.append(m * (n % 10))
		n //= 10
		m *= 10
	print(len(sol))
	print(*sol)


def f(x):
	x = list(str(x))
	length = len(x) - 1
	haha = []
	for i in x:
		i = i + '0' * length
		length -= 1
		haha.append(int(i))
	haha = [x for x in haha if x != 0]
	haha = [str(x) for x in haha]
	return haha
T = int(input())
for i in range(T):
	n = int(input())
	print(len(f(n)))
	print(' '.join(f(n)))


def strip(i):
	li = []
	while i != 0:
		temp = i % 10
		li.append(temp)
		i = i // 10
	li.reverse()
	return li
n = int(input())
li = []
for i in range(0, n):
	li.append(int(input()))
for i in li:
	ki = strip(i)
	lenk = len(ki)
	print(lenk - ki.count(0))
	ans = []
	ki.reverse()
	for i in range(0, lenk):
		if i == 0 and ki[i] == 0:
			pass
		elif i == 0 and ki[i] != 0:
			ans.append(ki[i])
		elif ki[i] != 0:
			ans.append(ki[i] * 10 ** i)
		else:
			pass
	for i in ans:
		print(i, end=' ')
	print('')


tc = int(input())
for t in range(tc):
	n = int(input())
	u = 0
	wn = 0
	cnt = 0
	wnList = []
	while n > 0:
		temp = n % 10
		n = n // 10
		wn = temp * 10 ** u
		u = u + 1
		if wn != 0:
			cnt = cnt + 1
			wnList.append(wn)
	print(cnt)
	print(*wnList)


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


import sys
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def read():
	c = 0
	if c:
		input = sys.stdin.readline
	else:
		sys.stdin = open('input1.txt', 'r')
		sys.stdout = open('output1.txt', 'w')

def solve():
	for _ in range(ii()):
		n = ii()
		a = []
		p = 1
		while n > 0:
			x = n % 10
			if x != 0:
				a.append(p * x)
			p *= 10
			n //= 10
		print(len(a))
		print(*a)
solve()


n = int(input())
lst = []
for i in range(n):
	x = int(input())
	lst.append(x)
for i in lst:
	lst3 = []
	s = str(i)
	for j in range(len(str(i))):
		if s[j] != '0':
			lst3.append(s[j] + '0' * (len(s) - j - 1))
	print(len(lst3))
	[print(lst3[i], end=' ') for i in range(len(lst3))]
	print()


t = int(input())
for _ in range(t):
	result = []
	n = input()
	while 1:
		while n != '' and n[0] == '0':
			n = n[1:]
		if n == '':
			break
		x = int(n[0])
		n = n[1:]
		result += [x * 10 ** len(n)]
	print(len(result))
	print(*result)


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
for _ in range(0, ii()):
	n = ii()
	a = list(str(n))
	k = []
	c = 0
	for i in range(len(a) - 1, -1, -1):
		if a[i] != '0':
			k.append(str(a[i] + '0' * c))
		c = c + 1
	print(len(k))
	print(' '.join(k))


def solve():
	n = int(input())
	ans = []
	power = 1
	while n > 0:
		if n % 10 > 0:
			ans.append(n % 10 * power)
		n //= 10
		power *= 10
	print(len(ans))
	for x in ans:
		print(x, end=' ')
t = int(input())
for _ in range(t):
	solve()


n = int(input())
final = []
while n != 0:
	i = 0
	t = int(input())
	num = t
	arr = []
	while t != 0:
		num = t % 10
		aa = num * int('1' + i * '0')
		t = t // 10
		if aa != 0:
			arr.append(aa)
		i += 1
	final.append(arr)
	n = n - 1
for i in final:
	print(len(i))
	for j in i:
		i
		print(j, end=' ')
	print()


t = int(input())
for q in range(t):
	n = int(input())
	r = []
	while n > 0:
		zeros = len(str(n)) - 1
		num = str(n)[0] + '0' * zeros
		n -= int(num)
		r.append(num)
	print(len(r))
	for k in range(len(r)):
		print(r[k], end=' ')
	print()


import random
import math
LI = lambda : list(map(int, input().split()))
MI = lambda : map(int, input().split())
yes = lambda : print('Yes')
no = lambda : print('No')
I = lambda : list(input())
J = lambda x: ''.join(x)
II = lambda : int(input())
SI = lambda : input()
t = II()
for q in range(t):
	a = []
	n = list(SI())[:][::-1]
	j = 0
	for i in n:
		if i != '0':
			a.append(i + '0' * j)
		j += 1
	print(len(a))
	print(*a)


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


for i in range(int(input())):
	n = int(input())
	b = str(n)
	c = len(b) - 1
	x = 10
	y = 0
	for w in range(len(b)):
		if b[w] != '0':
			y += 1
	print(y)
	if y == 1:
		print(n)
	else:
		e = []
		for q in range(len(b) - 1, -1, -1):
			if b[q] != '0':
				a = int(b[q])
				e.append(a)
				e.append(q + 1 - len(b))
		for o in range(0, len(e) - 1, 2):
			print(e[o] * 10 ** (-1 * e[o + 1]), end=' ')
		print(end='\n')


for _ in range(int(input())):
	n = input()
	if int(n) < 10:
		print(1)
		print(n)
	elif set(n[1:]) == [0]:
		print(1)
		print(n)
	else:
		k = 0
		s = []
		for i in range(len(n)):
			if n[i] != '0':
				k += 1
				s.append(n[i] + '0' * len(n[i + 1:]))
		print(k)
		for i in s:
			print(i, end=' ')
		print()


t = int(input())
for _ in range(t):
	num = int(input())
	lis = []
	itr = 1
	while num != 0:
		dig = num % 10
		if dig != 0:
			lis.append(dig * itr)
		itr *= 10
		num //= 10
	lis.reverse()
	print(len(lis))
	for i in lis:
		print(i, end=' ')
	print()


t = int(input())
for k in range(t):
	c = 0
	n = input()
	a = list(n)
	ans = []
	for i in range(len(a)):
		if a[i] == '0':
			pass
		else:
			c = c + 1
			an = int(a[i]) * 10 ** (len(a) - 1 - i)
			ans.append(an)
	print('')
	print(c)
	for i in ans:
		print(i, end=' ')


for _ in range(int(input())):
	x = input()
	y = len(x)
	if y == 1:
		print('1')
		print(x)
	elif int(x[0]) * 10 ** (y - 1) == int(x):
		print(1)
		print(x)
	else:
		c = 0
		p = x
		yu = []
		while len(p) > 1:
			c += 1
			y = int(p) % 10 ** (len(p) - 1)
			h = int(p) - y
			yu.append(h)
			p = str(y)
		if y != 0:
			yu.append(y)
			print(len(yu))
			print(*yu)
		else:
			print(len(yu))
			print(*yu)


T = int(input())
i = 0
while i < T:
	n = int(input())
	a = []
	step = 1
	while n > 0:
		x = n % 10
		if x != 0:
			a.append(x * step)
		step = step * 10
		n = n // 10
	print(len(a))
	print(*a)
	i += 1


t = int(input())
for i in range(t):
	ar = []
	df = int(input())
	if df >= 1000:
		r = df % 1000
		ar.append(str(df - r))
		df %= 1000
	if df >= 100:
		r = df % 100
		ar.append(str(df - r))
		df %= 100
	if df >= 10:
		r = df % 10
		ar.append(str(df - r))
		df %= 10
	if df < 10 and df > 0:
		ar.append(str(df))
	print(len(ar))
	print(' '.join(ar))


t = int(input())
for _ in range(t):
	n = int(input())
	arr = []
	div = 1
	while n > 0:
		if n % 10 > 0:
			arr.append(n % 10 * div)
		n = n // 10
		div *= 10
	print(len(arr))
	print(*arr)


t = int(input())
for w in range(t):
	n = input()
	k1 = len(n)
	k = 0
	l = []
	for i in range(k1):
		if int(n[i]) != 0:
			l.append(int(n[i]) * pow(10, k1 - i - 1))
			k += 1
	print(k)
	print(*l)


t = int(input())
while t > 0:
	t = t - 1
	s = input()
	n = len(s)
	count = 0
	for i in range(0, n):
		if int(s[i]) > 0:
			count += 1
	print(count)
	for i in range(0, n):
		if int(s[i]) > 0:
			print(int(s[i]) * 10 ** (n - 1 - i), end=' ')
	print('\n')


t = int(input())
for o in range(0, t):
	r = []
	e = 0
	p = input()
	for e in p:
		for i in range(0, len(r)):
			r[i] = r[i] + '0'
		if e != '0':
			r.append(e)
	print(len(r))
	print(' '.join(r))


t = int(input())
for _ in range(t):
	s = input()
	l = len(s)
	lst = []
	for i in range(l):
		ele = s[i]
		if ele != '0':
			ele = ele + '0' * (l - i - 1)
			lst.append(ele)
	print(len(lst))
	for i in lst:
		print(i, end=' ')
	print('')


for _ in range(int(input())):
	n = input()
	le = len(n)
	st = '0' * le
	ans = []
	count = 0
	for i in range(le):
		st = st.replace(st[0], '', 1)
		if n[i] != '0':
			ans.append(n[i] + st)
			count += 1
	print(count)
	print(*ans)


def rN(n):
	l = len(n)
	nums = []
	for i in range(l):
		if n[i] != '0':
			nums.append(int(n[i]) * 10 ** (l - i - 1))
	ln = len(nums)
	print(ln)
	for i in range(ln):
		print(nums[i])
n = int(input())
l = []
for i in range(n):
	l.append(input())
for i in range(n):
	rN(l[i])


for _ in range(int(input())):
	n = int(input())
	x = []
	l = []
	while n > 0:
		p = n % 10
		n = n // 10
		l.insert(0, p)
	le = len(l)
	for i in range(len(l)):
		q = l[i] * 10 ** (le - 1 - i)
		if q != 0:
			x.append(q)
	le1 = len(x)
	print(le1)
	for i in range(len(x)):
		print(x[i], end=' ')
	print()


t = int(input())
for i in range(t):
	n = input()
	lis = []
	numL = len(n)
	for i in n:
		if int(i) != 0:
			lis.append(int(i) * pow(10, numL - 1))
		numL = numL - 1
	lenL = len(lis)
	lis = list(map(str, lis))
	lis = ' '.join(lis)
	print(lenL)
	print(lis)


for _ in range(int(input())):
	n = int(input())
	cnt = 0
	lst = []
	k = 1
	while n:
		if n % 10 > 0:
			cnt += 1
			lst.append(n % 10 * k)
		n //= 10
		k *= 10
	print(cnt)
	print(*lst)


import math
for t in range(int(input())):
	n = input()
	l = len(n)
	num = int(n)
	count = []
	m = 0
	while num > 0:
		x = int(num % 10) * pow(10, m)
		if x != 0:
			count.append(x)
		num = int(num / 10)
		m += 1
	print(len(count))
	print(*count)


T = int(input())
while T != 0:
	n = input()
	m = 0
	for i in range(len(n)):
		if n[i] != '0':
			m = m + 1
	print(m)
	n = n[::-1]
	for i in range(len(n)):
		if n[i] != '0':
			k = 10 ** i
			print(int(n[i]) * k, end=' ')
	T -= 1


from sys import stdin, stdout
from collections import deque
rl = lambda : stdin.readline()
rll = lambda : stdin.readline().split()
rli = lambda : map(int, stdin.readline().split())

def toL(num):
	ans = deque()
	while num:
		(num, dig) = divmod(num, 10)
		ans.appendleft(dig)
	return ans

def main():
	T = int(rl())
	for _ in range(T):
		n = int(rl())
		L = toL(n)
		k = 0
		ans = []
		for (i, num) in enumerate(L):
			if num == 0:
				continue
			k += 1
			bi = len(L) - i - 1
			ans.append(num * 10 ** bi)
		stdout.write(str(k))
		stdout.write('\n')
		ansstr = ' '.join((str(pt) for pt in ans))
		stdout.write(ansstr)
		stdout.write('\n')
	stdout.close()
main()


def run():
	n = int(input())
	outputs = []
	base = int(1)
	while n > 0:
		if n % 10 > 0:
			outputs.append(base * (n % 10))
		n = n // 10
		base *= 10
	print(len(outputs))
	for i in range(len(outputs)):
		if i:
			print(' ', end='')
		print(outputs[i], end='')
	print('')
T = int(input())
for i in range(T):
	run()


t = int(input())
for i in range(0, t):
	x = input()
	lst = []
	count = 0
	for i in range(0, len(x)):
		if x[i] != '0':
			count += 1
			x1 = x[i] + '0' * (len(x) - 1 - i)
			lst.append(x1)
	print(count)
	print(*lst, sep=' ')


for _ in range(int(input())):
	n = int(input())
	s = str(n)
	ans = ''
	flag = 0
	for i in range(len(s) - 1, -1, -1):
		if s[i] != '0':
			ans += s[i] + '0' * (len(s) - i - 1) + ' '
			flag += 1
	print(flag)
	print(ans)


ans = []
for _ in range(int(input())):
	n = int(input())
	if n == 1 or n == 2 or n == 3 or (n == 4) or (n == 5) or (n == 6) or (n == 7) or (n == 8) or (n == 9):
		ans.append(1)
		ans.append(n)
		continue
	s = 0
	p = []
	t = len(str(n))
	for i in range(t):
		mod = n % 10 ** (i + 1)
		n = n - mod
		if mod != 0:
			s += 1
			p.append(mod)
	ans.append(1 if s == 0 else s)
	ans.append(p)
for i in ans:
	if isinstance(i, list):
		for x in i:
			print(x, end=' ')
		print()
	else:
		print(i)


c = int(input())
for a in range(c):
	n = int(input())
	li = []
	if n < 10:
		li.append(n)
	else:
		s = str(n)
		l = len(s) - 1
		li = []
		for i in range(len(s)):
			if s[i] != '0':
				q = int(s[i]) * 10 ** l
				li.append(q)
			l -= 1
	print(len(li))
	li = map(str, li)
	print(' '.join(li))


for _ in range(int(input())):
	n = input()
	if n[0] != '0' and n.count('0') == len(n) - 1 or len(n) == 1:
		print('1\n{}'.format(n))
	else:
		print(len(n) - n.count('0'))
		summands = []
		for (i, ch) in enumerate(n):
			if n[i] != '0':
				summands.append(n[i] + '0' * len(n[i + 1:]))
		for i in range(len(summands)):
			print(summands[i], end=' ')
		print()


test = int(input())
for t in range(test):
	n = int(input())
	k = len(str(n))
	a = []
	for i in range(1, k + 1):
		m = n % 10
		n = n // 10
		if m != 0:
			a += [m * 10 ** (i - 1)]
	a.sort(reverse=True)
	print(len(a))
	print(*a)


for _ in range(int(input())):
	n = int(input())
	n = str(n)
	res = []
	for (i, digit) in enumerate(n[::-1]):
		if digit == '0':
			continue
		res.append(digit + '0' * i)
	print(len(res))
	print(' '.join(res))


for _ in range(int(input())):
	n = int(input())
	numbers = []
	i = 0
	while n != 0:
		if n % 10 != 0:
			numbers.append(n % 10 * 10 ** i)
		n = n // 10
		i += 1
	print(len(numbers))
	print(' '.join(map(str, numbers)))


a = []
n = int(input())
for i in range(n):
	a.append(input())
for i in range(n):
	k = 0
	f = ''
	k2 = 1
	for j in a[i]:
		if j != '0':
			k += 1
			f += j + '0' * len(a[i][k2:]) + ' '
		k2 += 1
	print(k, f, sep='\n')


for tc in range(int(input())):
	n = int(input())
	count = 0
	ans = []
	while n != 0:
		if count == 0 and n % 10 != 0:
			ans.append(n % 10)
			count += 1
		else:
			if n % 10 != 0:
				ans.append(n % 10 * 10 ** count)
			count += 1
		n //= 10
	print(len(ans))
	print(*ans)


n = int(input())
s = [input() for i in range(n)]
for v in s:
	a = list(v)
	a.reverse()
	b = [a[i] + '0' * i for i in range(len(a))]
	c = [i for i in b if int(i) != 0]
	print(len(c))
	print(' '.join(c))


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


t = int(input())
while t > 0:
	x = int(input())
	if x >= 1 and x <= 9:
		print(1)
		print(x)
	elif x % 1000 == 0:
		print(1)
		print(x)
	else:
		u = 0
		i = 0
		l = []
		while x > 0:
			temp = 0
			u = x % 10
			if u != 0:
				temp = u * 10 ** i
				l.append(temp)
			i = i + 1
			x = x // 10
		print(len(l))
		for i in range(len(l)):
			print(l[i], end=' ')
	t = t - 1


MOD = 1000000007

def solve(n):
	ans = []
	i = 1
	while n != 0:
		val = n % 10 * 10 ** (i - 1)
		if val != 0:
			ans.append(val)
		n = n // 10
		i += 1
	print(len(ans))
	print(*ans, sep=' ')
for i in range(int(input())):
	n = int(input())
	solve(n)


from sys import stdin
input = stdin.readline

def main():
	test = int(input())
	for t in range(test):
		n = int(input())
		count = 0
		l = []
		c = 0
		while n > 0:
			if n % 10 != 0:
				l.append(n % 10 * pow(10, c))
				count += 1
			n = n // 10
			c += 1
		print(count)
		for i in l:
			print(i, end=' ')
		print()
main()


for _ in range(int(input())):
	n = int(input())
	a = []
	if n >= 1000:
		r = n % 1000
		a.append(n - r)
		n %= 1000
	if n >= 100:
		r = n % 100
		a.append(n - r)
		n %= 100
	if n >= 10:
		r = n % 10
		a.append(n - r)
		n %= 10
	if n >= 0:
		a.append(n)
	if 0 in a:
		a.remove(0)
	print(len(a))
	print(*a)


j = int(input())
for i in range(j):
	a = int(input())
	k = 0
	summ = []
	while a:
		if a % 10 != 0:
			summ.append(a % 10 * 10 ** k)
		a //= 10
		k += 1
	print(len(summ))
	print(*summ)


t = int(input())
for i in range(t):
	a = input()
	count = len(a)
	array = []
	for j in a:
		count = count - 1
		if int(j) != 0:
			array.append(int(j) * 10 ** count)
	print(len(array))
	print(*array)


T = int(input())
for t in range(T):
	original_num = int(input())
	rests = []
	steps = 0
	divisor = 10
	last = 0
	rest_num = 0
	while True:
		last = rest_num
		rest_num = original_num % divisor
		if rest_num - last != 0:
			rests.append(rest_num - last)
			steps += 1
		divisor = divisor * 10
		if rest_num == original_num:
			print(steps)
			for i in range(len(rests)):
				if i == len(rests) - 1:
					end = '\n'
				else:
					end = ' '
				print(rests[i], end=end)
			break


n = int(input())
l = []
for i in range(n):
	x = input()
	y = len(x)
	x = int(x)
	k = 0
	l = []
	while y >= 1 and x > 0:
		z = x // 10 ** (y - 1)
		d = z * 10 ** (y - 1)
		x = x - d
		y = len(str(x))
		k += 1
		l.append(d)
	print(k)
	for j in range(k):
		print(l[j])


t = int(input())
li = []
for i in range(t):
	n = int(input())
	li.append(n)
for i in li:
	if i == 0:
		print(0)
	else:
		a = len(str(i))
		for j in str(i):
			if int(j) == 0:
				a -= 1
		print(a)
		for j in range(len(str(i))):
			if int(str(i)[j]) != 0:
				b = len(str(i)) - j
				print(int(str(i)[j]) * 10 ** (b - 1), end=' ')
		print('')


import math
for test in range(int(input())):
	n = input()
	k = len(n)
	c = 0
	for i in range(k):
		if n[i] != '0':
			c += 1
	s = int(n)
	print(c)
	i = k
	while s != 0:
		r = s % 10
		if r != 0:
			ans = r * math.pow(10, k - i)
			print(int(ans), end=' ')
		i -= 1
		s = s // 10
	print()


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


t = int(input())
args = list()
for i in range(0, t):
	args.append(input())
for num in args:
	znum = list()
	mul = 1
	for char in num:
		znum.append(char)
	numbers = list()
	znum.reverse()
	for eachn in znum:
		numbers.append(int(eachn) * mul)
		mul = mul * 10
	if 0 in numbers:
		numbers.remove(0)
	numbers.reverse()
	ncount = 0
	for num in numbers:
		if num != 0:
			ncount += 1
	print(ncount)
	for num in numbers:
		if num != 0:
			print(num, end=' ')
	print()


t = int(input())
for _ in range(t):
	n = input()
	count = 0
	arr = []
	l = len(n)
	if l == 1:
		count = 1
		arr.append(int(n))
	else:
		for i in range(l):
			x = int(n[i]) * 10 ** (l - 1 - i)
			if x > 0:
				arr.append(x)
	print(len(arr))
	print(*arr)


for _ in range(int(input())):
	(n, d) = (int(input()), [])
	for i in [10000, 1000, 100, 10, 1]:
		if n >= i:
			d.append(n // i * i)
			n %= i
	print(len(d))
	print(' '.join(map(str, d)))


n_numbers = int(input())
for _ in range(n_numbers):
	number = input()
	digits = list(range(len(number)))[::-1]
	numbers = []
	for (digit, multiple) in zip(number, digits):
		numbers.append(int(digit) * 10 ** multiple)
	good_numbers = [str(x) for x in numbers if x]
	print(len(good_numbers))
	print(' '.join(good_numbers))


n = int(input())
for x in range(n):
	s = input()
	k = 0
	ans = ''
	for i in range(len(s)):
		if s[i] != '0':
			ans += s[i] + '0' * (len(s) - i - 1) + ' '
			k += 1
	print(k)
	print(ans)


for _ in range(int(input())):
	x = input()
	count = 0
	ans_arr = []
	for (i, val) in enumerate(reversed(x)):
		if val != '0':
			if i == 0:
				ans_arr.append(int(val))
			else:
				ans_arr.append(int(val) * 10 ** int(i))
			count += 1
		else:
			pass
	print(count)
	print(*ans_arr)


for i in range(int(input())):
	p = []
	c = 1
	n = input()
	for j in n:
		if int(str(j) + '0' * (len(n) - c)) != 0:
			p.append(int(str(j) + '0' * (len(n) - c)))
		c = c + 1
	print(len(p))
	for j in p:
		print(j, end=' ')
	print()


for i in range(int(input())):
	l = []
	cnt = 0
	a = input()
	b = len(a)
	for j in range(len(a)):
		b = b - 1
		if a[j] != '0':
			r = a[j] + '0' * b
			l.append(r)
			cnt = cnt + 1
	print(cnt)
	for k in l:
		print(str(k), end=' ')


from collections import defaultdict as dfd
import math
import sys

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def main():
	n = II()
	for i in range(n):
		v = int(input())
		t = len(str(v))
		p = str(v)
		co = 0
		l = []
		pl = 0
		for i in range(len(p) - 1, -1, -1):
			if p[i] != '0':
				l.append(int(p[i]) * 10 ** pl)
				co += 1
			pl += 1
		print(co)
		print(*l)
main()


t = int(input())
for i in range(t):
	ans = []
	number = input().rstrip('\r')
	tam = len(number)
	for j in range(tam):
		if number[j] != '0':
			aux = number[j]
			for k in range(j, tam - 1):
				aux += '0'
			ans.append(aux)
	print(len(ans))
	print(*ans)


for _ in range(int(input())):
	n = int(input())
	counter = 0
	output = []
	if n <= 10:
		output.append(n)
	else:
		while n > 0:
			if n % 10 != 0:
				output.append(pow(10, counter) * int(n % 10))
			counter = counter + 1
			n = int(n / 10)
	print(len(output))
	print(*output)


t = int(input())
for _ in range(t):
	a = input()
	n = 0
	nums = []
	for (i, c) in enumerate(a):
		if c != '0':
			n += 1
			nums.append(int(c) * 10 ** (len(a) - i - 1))
	print(n)
	print(' '.join(map(str, nums)))


t = int(input())
ans = []
for g in range(t):
	a = input()
	q = []
	w = len(a)
	k = 0
	for i in range(w):
		if a[i] != '0':
			q += [a[i] + '0' * (w - i - 1)]
			k += 1
	ans.append([k, q])
for i in ans:
	print(i[0])
	print(' '.join(map(str, i[1])))


t = int(input())
for _ in range(t):
	n = input()
	arr = []
	length = len(n)
	cnt = length - 1
	for num in n:
		if int(num) != 0:
			arr.append(num + '0' * cnt)
		cnt -= 1
	print(len(arr))
	print(' '.join(arr))


def main():
	t = eval(input())
	for i in range(t):
		number = eval(input())
		list2 = []
		count = 0
		while number > 10:
			temp = number - number // 10 * 10
			number = number // 10
			if temp != 0:
				list2.append(temp * 10 ** count)
			count = count + 1
		list2.append(number * 10 ** count)
		print(len(list2))
		for item in list2:
			print(item, end=' ')
main()


t = int(input())
for x in range(t):
	n = int(input())
	arra = []
	div = 10
	while n > 0:
		if n % div != 0:
			arra.append(n % div)
			n -= n % div
		else:
			div *= 10
	print(len(arra))
	print(*arra, sep=' ')


for i in range(int(input())):
	n = int(input())
	list = []
	num = 0
	a = 1
	while n != 0:
		q = n % 10
		if q != 0:
			list.append(q * a)
			num += 1
		a *= 10
		n = n // 10
	print(num)
	for j in range(len(list)):
		print(str(list[j]) + ' ', end='')
	print()


cases = int(input())
for _ in range(cases):
	n = input()
	x = len(n)
	w = []
	for i in range(len(n)):
		if int(n[i] + '0' * (x - 1 - i)) != 0:
			w.append(n[i] + '0' * (x - 1 - i))
	print(len(w))
	print(*w)


n = int(input())
a = 0
b = []
c = []
for i in range(n):
	a = int(input())
	b.append(0)
	c.append([])
	while a > 0:
		c[-1].append(a % 10 if a % 10 * 10 ** b[-1] != 0 else 0)
		b[-1] += 1 if a % 10 * 10 ** b[-1] != 0 else 0
		a //= 10
for i in range(len(c)):
	print(b[i])
	for j in range(len(c[i])):
		print(str(c[i][j] * 10 ** j) + ' ' if c[i][j] != 0 else '', end='')
	print('')


t = int(input())
while t > 0:
	k = 0
	n = list(input())
	n.reverse()
	for i in range(0, len(n)):
		if int(n[i]) != 0:
			k = k + 1
	print(k)
	for i in range(0, len(n)):
		nmod = int(n[i]) * pow(10, i)
		if nmod != 0:
			print(nmod, end=' ')
	print('\n', end='')
	t = t - 1


for _ in range(int(input())):
	s = input()
	l = len(s)
	res = []
	for i in range(l):
		if s[i] != '0':
			res.append(int(s[i]) * 10 ** (l - 1 - i))
	print(len(res))
	print(*res)


n = int(input())
test_cases = [input() for _ in range(n)]
answer = []
for i in test_cases:
	answer.append([i[j] + '0' * (len(i) - 1 - j) for j in range(len(i)) if i[j] != '0'])
for i in answer:
	print(len(i))
	[print(_, end=' ') for _ in i]
	print('')


def sum_of_round_numbers(nums):
	for x in nums:
		if len(str(x)) == 1:
			print(1)
			print(x)
			continue
		ten = len(str(x)) - 1
		ans = []
		for y in str(x):
			if y == '0':
				ten -= 1
				continue
			else:
				ans.append(int(y) * 10 ** ten)
				ten -= 1
		print(len(ans))
		for i in range(len(ans)):
			if i == len(ans) - 1:
				print(ans[i])
			else:
				print(ans[i], end=' ')
t = int(input())
numbers = []
for x in range(0, t):
	numbers.append(int(input()))
sum_of_round_numbers(numbers)


def f(n):
	k = 0
	a = []
	b = n
	s = 0
	while b > 0:
		k += 1
		b //= 10
	for i in range(k):
		if n % 10 != 0:
			s += 1
			a.append(n % 10 * 10 ** i)
		n //= 10
	print(s, end='\n')
	for i in a:
		print(i, end=' ')
	print(end='\n')
t = int(input())
s = []
for i in range(t):
	x = int(input())
	s.append(x)
for i in s:
	f(i)


for _ in range(int(input())):
	n = int(input())
	s = [1, 2, 3, 4, 5, 6, 7, 8, 9]
	if n in s:
		print('1')
		print(n)
	else:
		res = [int(x) for x in str(n)]
		k = [i for i in res if i != 0]
		c = []
		if len(k) == 1:
			print('1')
			print(n)
		else:
			for j in range(len(res)):
				c.append(res[j] * 10 ** (len(res) - j - 1))
			c = [o for o in c if o != 0]
			print(len(c))
			print(*c)


t = int(input())
for _ in range(t):
	n = int(input())
	a = []
	c = 0
	cout = 0
	while n != 0:
		s = n % 10
		if s != 0:
			a.append(s * 10 ** c)
			cout = cout + 1
			c = c + 1
		else:
			c = c + 1
		n = n // 10
	print(cout)
	print(*a)


import sys

def inpu():
	return sys.stdin.readline().strip()
n = int(inpu())
for i in range(n):
	x = input()
	ans = ''
	k = 0
	for i in range(len(x)):
		if x[i] != '0':
			k += 1
			ans += x[i] + '0' * (len(x) - i - 1)
			ans += ' '
	print(k)
	print(ans)


def find_lenght(a):
	len_a = 0
	while a:
		a = a // 10
		len_a += 1
	return len_a

def solve(a):
	res = []
	while a:
		len_a = find_lenght(a)
		leftmost = a // 10 ** (len_a - 1)
		ans = leftmost * 10 ** (len_a - 1)
		res.append(ans)
		a -= ans
	return (len(res), res)
cases = int(input())
for _ in range(cases):
	n = int(input())
	(len_ans, ans) = solve(n)
	print(len_ans)
	print(*ans)


def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		ans = []
		num_zero = 0
		while len(str(n)) > 1:
			if n % 10 == 0:
				n = n // 10
				num_zero += 1
				continue
			else:
				ans.insert(0, n % 10 * 10 ** num_zero)
				num_zero += 1
				n = n // 10
		ans.insert(0, n * 10 ** num_zero)
		print(len(ans))
		ans = map(str, ans)
		print(' '.join(ans))
main()


N = int(input())
for i in range(N):
	a = input()
	b = int(a)
	count = 0
	if b < 10:
		print(1)
		print(int(b))
	elif b >= 10 and b < 100:
		c = b % 10
		d = b // 10 * 10
		if c != 0:
			count += 1
		if d != 0:
			count += 1
		print(count)
		if c != 0:
			print(int(c), end=' ')
		if d != 0:
			print(int(d))
	elif b >= 100 and b < 1000:
		d = b % 10
		c = b % 100 - d
		e = b // 100 * 100
		if c != 0:
			count += 1
		if d != 0:
			count += 1
		if e != 0:
			count += 1
		print(count)
		if c != 0:
			print(int(c), end=' ')
		if d != 0:
			print(int(d), end=' ')
		if e != 0:
			print(int(e))
	elif b >= 1000 and b < 10000:
		d = b % 10
		c = b % 100 - d
		f = b % 1000 - c - d
		e = b // 1000 * 1000
		if c != 0:
			count += 1
		if d != 0:
			count += 1
		if e != 0:
			count += 1
		if f != 0:
			count += 1
		print(count)
		if c != 0:
			print(int(c), end=' ')
		if d != 0:
			print(int(d), end=' ')
		if f != 0:
			print(int(f), end=' ')
		if e != 0:
			print(int(e))
	elif b == 10000:
		print(1)
		print(b)


for t in range(int(input())):
	n = int(input())
	c = 0
	p = 0
	ls = []
	while n != 0:
		a = n % 10
		p = p + 1
		if a != 0:
			c = c + 1
			ls.append(a * 10 ** (p - 1))
		n = n // 10
	print(c)
	print(*ls)


n = 0
n = int(input())
m = 0
while m < n:
	a = input()
	a = str(a)
	ans = []
	for i in range(len(a)):
		if a[i] == '0':
			continue
		else:
			val = int(a[i]) * pow(10, len(a) - i - 1)
			ans.append(val)
	print(len(ans))
	for val in ans:
		print(val, end=' ')
	print()
	m += 1


for _ in range(int(input())):
	number = int(input())
	n = len(str(number))
	terms = 1
	arr = []
	for i in range(1, n + 1):
		if number % 10 ** i != 0:
			arr.append(number % 10 ** i)
			number -= number % 10 ** i
	print(len(arr))
	print(*arr)


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	n = input()[:-1]
	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)


def solve(a):
	answer = []
	for (i, char) in enumerate(list(str(a))):
		if char != '0':
			answer.append(int(char) * 10 ** (len(str(a)) - i - 1))
	print(len(answer))
	print(*answer)
t = int(input())
for i in range(t):
	solve(int(input()))


for t in range(int(input())):
	n = int(input())
	(lst, x) = ([], 1)
	while n > 0:
		if n % 10 == 0:
			n //= 10
			x *= 10
		else:
			lst.append(n % 10 * x)
			x *= 10
			n //= 10
	print(len(lst))
	print(*lst)


from sys import stdin, stdout
import collections
t = int(input())

def solve(n):
	k = len(str(n))
	cnt = 0
	ans = []
	r = 10 ** (k - 1)
	for c in str(n):
		m = int(int(c) * r)
		if m != 0:
			ans += [m]
		r /= 10
	print(len(ans))
	print(' '.join(list(map(str, ans))))
for i in range(t):
	n = int(input())
	solve(n)


t = int(input())
while t > 0:
	t -= 1
	n = str(input())
	dum = []
	for i in n:
		i = int(i)
		dum += [i]
	x = len(dum)
	x1 = len(dum)
	ans = []
	y = 0
	while x > 0:
		z = dum[y]
		if z != 0:
			ans += [y]
		x -= 1
		y += 1
	ansL = []
	while len(ans) > 0:
		z = ans[0]
		te = x1 - (z + 1)
		d1 = dum[z]
		d2 = d1 * 10 ** te
		ansL += [d2]
		ans.pop(0)
	a = len(ansL)
	print(a)
	while a > 0:
		print(ansL[0], end=' ')
		ansL.pop(0)
		a -= 1
	print()


t = int(input())
for _ in range(t):
	n = input()
	cnt = len(n) - 1
	ans = 0
	l = []
	for i in n:
		if i == '0':
			cnt -= 1
			continue
		ans += 1
		l.append(int(i) * 10 ** cnt)
		cnt -= 1
	print(ans)
	print(*l)


for _ in range(int(input())):
	n = int(input())
	m = 0
	ans = []
	while n > 0:
		rest = n % 10
		if rest > 0:
			ans.append(rest * 10 ** m)
			n -= rest
		else:
			n //= 10
			m += 1
	print(len(ans))
	print(*ans)


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


T = int(input())
for t in range(T):
	n = int(input())
	ans = []
	for c in [10000, 1000, 100, 10, 1]:
		v = n // c
		if v != 0:
			ans.append(v * c)
			n -= v * c
	print(len(ans))
	v = str(ans)[1:-1].replace(',', '')
	print(v)


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


for _ in range(int(input())):
	n = int(input())
	a = 1
	print(len(str(n)) - str(n).count('0'))
	while n > 0:
		if n % 10 * a:
			print(n % 10 * a, end=' ')
		n //= 10
		a *= 10
	print()


from math import pow
t = int(input())
for i in range(t):
	x = int(input())
	values = []
	temp = x
	while temp:
		t = temp % 10
		values.append(t)
		temp = temp // 10
	res = []
	for i in range(len(values)):
		if values[i] != 0:
			x = int(values[i] * pow(10, i))
			res.append(x)
	print(len(res))
	for value in res:
		print(value, end=' ')
	print()


for _ in range(int(input())):
	n = input()
	l = len(n)
	cnt = n.count('0')
	ans = l - cnt
	print(ans)
	cnt = l
	for i in n:
		if i != '0':
			print(i + '0' * (cnt - 1), end=' ')
		cnt -= 1
	print()


def func(n):
	n = list(n)
	k = 0
	for i in n:
		if i != '0':
			k += 1
	print(k)
	for i in range(len(n)):
		if n[i] != '0':
			str_ = n[i] + '0' * (len(n) - i - 1)
			print(int(str_), ' ', end='')
	print()
t = int(input())
for _ in range(t):
	n = input()
	func(n)


n = int(input())
while n != 0:
	n2 = input()
	count = 0
	ans = []
	j = 1
	for i in range(len(n2) - 1, -1, -1):
		if n2[i] != '0':
			count += 1
			ans.append(int(n2[i]) * j)
		j = j * 10
	print(count)
	for a in ans:
		print(a, end=' ')
	n -= 1


t = range(int(input('')))
ns = []
ss = []
for i in t:
	ns += [input('')]
for n in ns:
	l = len(n) - 1
	s = []
	for i in range(l + 1):
		if n[i] != '0':
			s += [str(int(n[i]) * 10 ** (l - i))]
	ss.append(s)
for s in ss:
	print(len(s))
	print(' '.join(s))


a = []
test = int(input())
while test != 0:
	n = int(input())
	x = str(n)
	j = 0
	b = []
	for i in range(len(x) - 1, -1, -1):
		if x[i] != '0':
			res = x[i] + '0' * j
			b.append(int(res))
		j += 1
	a.append(b)
	test -= 1
for i in range(len(a)):
	print(len(a[i]))
	print(*a[i], sep=' ', end='\n')


for i in range(1, int(input()) + 1):
	num = str(input())
	r = [int(num[i:]) - int(num[i + 1:]) for i in range(len(num[:-1]))]
	r.append(int(num[-1]))
	r = [x for x in r if x != 0]
	print(len(r))
	print(*r, sep=' ')


t = int(input())
n = []
for i in range(t):
	n.append(int(input()))
k = 0
for i in n:
	s = str(i)
	k = 0
	r = []
	for o in range(len(s)):
		if s[o] != '0':
			k += 1
			t = s[o].ljust(len(s) - o, '0')
			r.append(t)
	print(k)
	print(*r, sep=' ')


for _ in range(int(input())):
	t = input()
	h = 0
	nums = list()
	for i in t:
		h += 1
		if int(i) != 0:
			nums.append(int(i) * 10 ** (len(t) - h))
	print(len(nums))
	for val in nums:
		print(val, end=' ')
	print()


t = int(input())
for case in range(t):
	n = int(input())
	pw = 1
	ar = []
	while n:
		if n % 10:
			ar.append(n % 10 * pw)
		n = n // 10
		pw = pw * 10
	print(len(ar))
	for i in ar:
		print(i, end=' ')


n = int(input())
for i in range(n):
	x = input()
	l = len(x)
	s = ''
	for j in range(len(x)):
		if str(x[j]) != '0':
			s = s + x[j] + (l - 1) * str(0) + ' '
		l = l - 1
	f = s.count(' ')
	print(f)
	print(s)


t = int(input())
for i in range(t):
	n = int(input())
	s = str(n)
	l = len(s)
	r = []
	m = int('1' + (l - 1) * '0')
	if l == 1 or n % m == 0:
		print(1)
		print(n)
	else:
		print(len(s) - s.count('0'))
		for j in s:
			if j != '0':
				r.append(j + (l - 1) * '0')
			l -= 1
		for k in r:
			print(k, sep=' ', end=' ')
		print()


for _ in range(int(input())):
	n = int(input())
	l = []
	xx = 0
	cc = 0
	while n != 0:
		c = n % 10
		if c != 0:
			l.append(c * 10 ** xx)
			cc += 1
		n = n // 10
		xx += 1
	print(cc)
	for i in l[-1::-1]:
		print(i, end=' ')
	print()


t = int(input())
output = []
for _ in range(t):
	n = input()
	n = ''.join(reversed(n))
	for i in range(len(n)):
		if n[i] != '0':
			output.append(n[i] + '0' * i)
	print(len(output))
	for i in output:
		print(i, end=' ')
	print()
	output = []


for _ in range(int(input())):
	n = input()
	a = []
	for i in range(len(n)):
		if n[i] == '0':
			continue
		a.append(n[i] + '0' * (len(n) - i - 1))
	print(len(a))
	print(*a)


s = []
for jjk in range(int(input())):
	n = input()
	p = []
	for i in range(0, len(n)):
		q = n[i] + '0' * (len(n) - i - 1)
		if int(q) != 0:
			p.append(q)
	s.append(p)
for i in s:
	print(len(i))
	for j in i:
		print(j, end=' ')
	print()


for _ in range(int(input())):
	n = input()
	le = len(n)
	li = []
	for i in n:
		if i != '0':
			li.append(i + '0' * (le - 1))
		le -= 1
	print(len(li))
	print(*li)


for _ in range(int(input())):
	n = input()
	l = []
	c = len(n)
	c_ = 0
	for i in n:
		c -= 1
		if i == '0':
			continue
		l.append(i + '0' * c)
		c_ += 1
	print(c_)
	print(*l)


t = int(input())
ns = [input() for _ in range(t)]
for n in ns:
	if len(n) == 1:
		print(1)
		print(n)
	else:
		ans = [int(n[i]) * 10 ** (len(n) - (i + 1)) for i in range(len(n)) if n[i] != '0']
		print(len(ans))
		print(*ans)


import sys
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
from collections import Counter
import collections
import math
import heapq
import re

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def most_frequent(list):
	return max(set(list), key=list.count)

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def Convert(string):
	li = list(string.split(''))
	return li

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
prime = []
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j

def main():
	for _ in range(int(input())):
		n = inin()
		n2 = n
		flag = 0
		count = 0
		fn = len
		while n2 > 0:
			n2 = n2 // 10
			count += 1
		if count == 1:
			print(count)
			print(n)
			continue
		else:
			a = []
			arr = [int(d) for d in str(n)]
			for i in range(1, fn(arr)):
				if arr[count - i] == 0:
					continue
				else:
					flag = 1
					a.append(arr[count - i] * pow(10, i - 1))
		a.append(arr[0] * pow(10, fn(arr) - 1))
		print(fn(a))
		print(*a)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


n = int(input())
for i in range(n):
	answer = []
	number = list(input())
	while number:
		k = number.pop(0)
		if k == '0':
			continue
		answer.append(k + '0' * len(number))
	print(len(answer))
	print(' '.join(answer))


for _ in range(int(input())):
	n = input()
	l = list(map(int, n))
	z = list(filter(lambda x: x, l))
	print(len(z))
	l.reverse()
	for i in range(len(l)):
		if l[i] != 0:
			print(l[i] * 10 ** i, end=' ')
	print()


lst = [input() for _ in range(int(input()))]
for n in lst:
	l = len(n) - 1
	print(l - n.count('0') + 1)
	res = []
	for i in n:
		tmp = int(i) * 10 ** l
		if tmp:
			res.append(tmp)
		l -= 1
	print(*res)


test_cases = int(input())
for _unk in range(test_cases):
	input_num = str(int(input()))
	addends = []
	for ch_idx in range(len(input_num)):
		if input_num[ch_idx] == '0':
			continue
		output_number = input_num[ch_idx] + '0' * (len(input_num) - ch_idx - 1)
		addends.append(output_number)
	print(len(addends))
	print(' '.join(addends))


from sys import stdin
from math import gcd
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	n = inp()
	a = []
	for i in range(len(n) - 1, -1, -1):
		if n[len(n) - i - 1] == '0':
			continue
		x = n[len(n) - i - 1] + '0' * i
		a.append(x)
	print(len(a))
	print(*a)


n = int(input())
for i in range(n):
	x = input()
	l = len(x)
	ans = []
	for j in range(l):
		if x[j] != '0':
			ans += [x[j] + '0' * (l - j - 1)]
	print(len(ans))
	print(*ans)


t = int(input())
for _ in range(t):
	n = input()
	length = len(n)
	n = int(n)
	st = ''
	count = 0
	for j in range(length):
		mo = n % 10 ** (j + 1)
		if mo == 0:
			continue
		st = f'{mo} ' + st
		n -= mo
		count += 1
	print(count)
	print(st)


t = int(input())
for _ in range(t):
	n = input()
	size = len(n)
	l = list(map(int, list(n)))
	length = list(filter(lambda a: a != 0, l))
	print(len(length))
	l = [l[i] * 10 ** (size - i - 1) for i in range(len(l)) if l[i]]
	print(*l)


def fun(number):
	count = 0
	ans = []
	while number:
		if number % 10:
			ans.append(str(number % 10 * 10 ** count))
		number //= 10
		count += 1
	return ans

def main():
	T = int(input())
	for i in range(T):
		number = int(input())
		ans = fun(number)
		print(len(ans))
		for _ in ans:
			print(_, end=' ')
		print()
	pass
main()


n = int(input())
for i in range(n):
	l = input()
	k = len(l)
	m = list(l)
	q = []
	a = 0
	for j in range(k):
		if m[k - j - 1] == '0':
			pass
		else:
			z = int(m[k - j - 1]) * 10 ** j
			q.append(z)
			a += 1
	g = len(q)
	print(a)
	for t in range(g - 1):
		print(q[t], end=' ')
	print(q[g - 1])


import math
t = int(input())
for m in range(t):
	list_t = input().split()
	result = [int(item) for item in list_t]

	def how(n):
		k = int(math.log10(n)) + 1
		j = 0
		list_res = []
		for i in range(k):
			a = math.fmod(n, 10)
			n = math.floor(n / 10)
			if a != 0:
				j = j + 1
				list_res.append(int(a * 10 ** i))
		print(j)
		for el in list_res:
			print(el, end=' ')
		print('')
		return [k, j, list_res]
	for n in result:
		how(n)


t = int(input())
for t in range(0, t):
	n = list(input())
	n = [int(x) for x in n]
	l = len(n)
	x = ''
	z = 0
	for i in range(0, l):
		n[i] = n[i] * 10 ** (l - 1 - i)
		if n[i] != 0:
			z = z + 1
			x = x + str(n[i]) + ' '
	x = x.strip()
	print(z)
	print(x)


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


t = int(input())
for i in range(t):
	b = input()
	l = len(b)
	c = []
	if l == 1:
		print(l)
		print(b)
	else:
		for i in range(l):
			y = int(b[i]) * 10 ** (l - i - 1)
			if y > 0:
				c.append(y)
		print(len(c))
		print(str(c).lstrip('[').rstrip(']').replace(',', ''))


t = int(input())
for i in range(0, t):
	k = 0
	c = 0
	n = int(input())
	z = ''
	while n != 0:
		m = n % 10
		n //= 10
		if m != 0:
			z = z + ' ' + str(m * 10 ** k)
			c += 1
		k += 1
	print(c)
	print(z)


import os
from math import floor

def run_util(num):
	n = 1
	power = len(str(num))
	n = 10 ** (power - 1)
	ans = [int(i) for i in str(num)]
	for (i, digit) in enumerate(ans):
		ans[i] *= n
		n /= 10
	remove_zero = [floor(i) for i in ans if i != 0]
	print(len(remove_zero))
	for digit in remove_zero:
		print(digit, end=' ')

def main():
	iteration = int(input())
	for i in range(0, iteration):
		num = int(input())
		run_util(num)
main()


t = int(input())
num_list = []
count = 0
while count < t:
	n = int(input())
	num_list.append(n)
	count += 1
for x in num_list:
	num_s = 0
	sum_num = []
	if len(list(str(x))) == 1:
		num_s += 1
		print(num_s)
		print(x)
	else:
		rem = x % 10
		if rem != 0:
			sum_num.append(str(rem))
			x = x - rem
		num_zeros = len(list(str(x))) - 1
		x = x // 10
		for y in list(str(x)):
			n = str(int(y) * 10 ** num_zeros)
			if n != '0':
				sum_num.append(n)
				num_zeros -= 1
			else:
				num_zeros -= 1
		print(len(sum_num))
		print(' '.join(sum_num))


x = int(input())
l2 = list()
l3 = []
for _ in range(x):
	n = str(input())
	l = len(n) - 1
	s = list()
	for i in range(len(n)):
		if n[i] != '0':
			s.append(n[i] + '0' * (l - i))
	l2.append(s)
	l3.append(len(s))
for a in range(0, len(l2)):
	print('\n%d' % l3[a])
	for x in l2[a]:
		print(x, end=' ')


t = int(input())
for j in range(t):
	(n, k, m, p) = (int(input()), 1, set(), 0)
	while n > 10 ** k != 0:
		k = k + 1
	for i in range(5):
		m.add(n // 10 ** i % 10 * 10 ** i)
	for i in m:
		if i == 0:
			p = 1
	print(len(m) - p)
	for i in m:
		if i != 0:
			print(i, end=' ')
	print()


import sys
t = int(sys.stdin.readline().strip())
for _ in range(t):
	n = int(sys.stdin.readline().strip())
	summands = []
	mult = 1
	while n:
		digit = n % 10
		if digit:
			summands.append(str(digit * mult))
		n //= 10
		mult *= 10
	print(len(summands))
	print(' '.join(summands))


for _ in range(int(input())):
	s = int(input())
	s = str(s)
	n = len(s)
	c = 0
	a = []
	d = {}
	for i in range(n):
		if s[i] != '0':
			c += 1
			d[i] = n - i - 1
	print(c)
	for key in d:
		print(int(s[key]) * pow(10, d[key]), end=' ')
	print('')


T = int(input())
for _ in range(T):
	c = 0
	a = []
	n = input()
	for i in range(len(n)):
		if n[i] != '0':
			c += 1
			a.append(n[i] + '0' * (len(n) - (i + 1)))
	print(c)
	print(*a)


for _ in range(int(input())):
	n = list(map(int, list(input())))
	n.reverse()
	a = list()
	count = 0
	for dis in range(len(n)):
		if n[dis] * 10 ** dis:
			a.append(n[dis] * 10 ** dis)
			count += 1
	print(count)
	print(*a)


t = int(input())
while t > 0:
	ans = []
	n = input()
	div = 0
	sz = len(n)
	for i in range(sz):
		if n[sz - 1 - i] != '0':
			ans.append(n[sz - 1 - i] + '0' * div)
		div += 1
	print(len(ans))
	for a in ans:
		print(a, end=' ')
	print()
	t -= 1


t = int(input())

def solve(n):
	a = list()
	q = list()
	while n > 0:
		a.append(n % 10)
		n //= 10
	for i in range(len(a)):
		if a[i] != 0:
			q.append(a[i] * 10 ** i)
	return q
for i in range(t):
	k = solve(int(input()))
	print(len(k))
	print(*k)


t = int(input())
for i in range(t):
	n = int(input())
	digits = len(str(n))
	ans = []
	while n > 0:
		j = int(str(n)[0])
		digits = len(str(n)) - 1
		ans.append(j * 10 ** digits)
		n %= 10 ** digits
	print(len(ans))
	print(' '.join(map(str, ans)))


import math
t = int(input())
for i in range(t):
	n = int(input())
	if 0 < n <= 10:
		print(1)
		print(n)
	else:
		l = []
		j = 0
		while n:
			r = n % 10
			n = n // 10
			if r != 0:
				l.append(int(math.pow(10, j) * r))
			j = j + 1
		print(len(l))
		for i in range(len(l)):
			print(l[i], end=' ')
		print()


for x in range(int(input())):
	liczba = input()
	wynik = []
	zera = len(liczba) - 1
	for x in liczba:
		if x != '0':
			wynik.append(str(int(x) * 10 ** zera))
		zera -= 1
	print(len(wynik))
	print(*wynik)


import math
t = int(input())
while t != 0:
	n = int(input())
	k = str(n)
	A = []
	for i in range(len(k)):
		d = int(k[i])
		if d != 0:
			r = d * 10 ** (len(k) - 1 - i)
			A.append(r)
	print(len(A))
	print(*A)
	t -= 1


def print_beaut(num):
	a = [int(dig) for dig in str(num)]
	n = len(a)
	s = 0
	res = []
	for i in range(n):
		if a[i] != 0:
			s += 1
			res.append(a[i] * 10 ** (n - 1 - i))
	print(s)
	print(*res)
lines = int(input())
for i in range(lines):
	num = int(input())
	print_beaut(num)


n = int(input())
while n != 0:
	num = int(input())
	if num % pow(10, len(str(num)) - 1) == 0:
		print(1)
		print(num)
	else:
		ranges = []
		while num != 0:
			ranges.append(num % 10)
			num //= 10
		ranges = ranges[::-1]
		curr = len(ranges) - ranges.count(0)
		print(curr)
		ans = []
		for x in range(len(ranges)):
			if ranges[x] != 0:
				ans.append(pow(10, len(ranges) - 1 - x) * ranges[x])
		print(*ans)
	n -= 1


for i in range(int(input())):
	t = input()
	tot = 0
	r = []
	for i in range(len(t)):
		if not t[i] == '0':
			tot += 1
			r.append(t[i] + '0' * (len(t) - i - 1))
	print(tot)
	print(' '.join(r))


from collections import defaultdict

def solve():
	n = input()
	l = []
	ll = len(n)
	i = 0
	while ll:
		if n[i] != '0':
			l.append(n[i] + '0' * (ll - 1))
		i += 1
		ll -= 1
	print(len(l))
	print(*l)
for _ in range(int(input())):
	solve()


from typing import Tuple, Set

def solve(n: str) -> Tuple[int, Set[int]]:
	summands = {int(digit) * 10 ** exp for (exp, digit) in enumerate(reversed(n))}
	summands -= {0}
	return (len(summands), summands)
t: int = int(input())
for _ in range(t):
	(n, nums) = solve(input())
	print(n)
	print(' '.join(map(str, nums)))


t = int(input())
while t > 0:
	n = int(input())
	i = 0
	sum = 0
	l = []
	while n > 0:
		p = n % 10
		if p != 0:
			l.append(p * 10 ** i)
			sum += 1
		i += 1
		n = n // 10
	print(sum)
	for i in l:
		print(i, end=' ')
	t -= 1


t = int(input())
for it in range(t):
	num = input()
	l = len(num)
	total_n = 0
	numbers = []
	for i in range(l):
		local_n = int(num[l - i - 1])
		if local_n != 0:
			total_n += 1
			numbers.append(local_n * 10 ** i)
		else:
			continue
	print(total_n)
	for x in numbers:
		print(x, end=' ')
	print('')


caselist = []
cases = int(input())
for i in range(cases):
	num = int(input())
	caselist.append(num)
for x in caselist:
	digits = []
	while x > 0:
		digit = x % 10
		digits.append(digit)
		x = x // 10
	print(len(digits) - digits.count(0))
	rounds = []
	for y in range(len(digits)):
		if digits[y] != 0:
			rounds.append(str(digits[y] * 10 ** y))
	print(' '.join(rounds))


from sys import stdout, stdin
import io
import os
input = stdin.readline
for _ in range(int(input())):
	n = input().strip()
	m = len(n)
	a = []
	k = 0
	for i in range(m):
		if n[i] != '0':
			a.append(n[i] + '0' * (m - i - 1))
			k += 1
	print(k)
	print(*a)


def main():
	t = int(input())
	for i in range(t):
		n = input()
		ans = []
		for j in range(len(n)):
			if n[j] != '0':
				ans.append(int(n[j]) * 10 ** (len(n) - j - 1))
		print(len(ans))
		print(' '.join(map(str, ans)))
main()


def handle(number):
	parts = list(number)
	for (i, p) in enumerate(parts, 1):
		n = p + '0' * (len(parts) - i)
		if int(n) != 0:
			yield n
cases = int(input())
for case in range(cases):
	result = tuple(handle(str(input())))
	print(len(result))
	print(' '.join(result))


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	ls = []
	i = 0
	while n != 0:
		if n % 10 != 0:
			ans += 1
			ls.append(n % 10 * 10 ** i)
			n = n // 10
		else:
			n = n // 10
		i += 1
	print(ans)
	print(' '.join(map(str, ls)))


def Number_As_A_Sum(N):
	L = []
	Power = 1
	while N > 0:
		use = N // 10
		update = use * 10
		K = N - update
		KP = K * Power
		if KP != 0:
			L.append(KP)
		Power = Power * 10
		N = N // 10
	return L
T = int(input())
for i in range(T):
	N = int(input())
	Set = Number_As_A_Sum(N)
	Length = len(Set)
	print(Length)
	for i in range(Length):
		print(Set[i], end=' ')
	print()


def expanded_form(num):
	result = []
	for (index, digit) in enumerate(str(num)[::-1]):
		if int(digit) != 0:
			result.append(digit + '0' * index)
	return (' '.join(result[::-1]), len(result))
for _ in range(int(input())):
	n = int(input())
	arr = expanded_form(n)[::-1]
	for i in arr:
		print(i)


t = int(input())
for i in range(t):
	n = int(input())
	dd = str(n)
	ss = dd[-1::-1]
	l = []
	j = len(ss) - 1
	while j > 0:
		if ss[j] != '0':
			l.append([int(ss[j]), j])
		j -= 1
	l.append([int(ss[0]), 0])
	ANS = []
	for j in range(len(l)):
		ANS.append(int(str(l[j][0]) + l[j][1] * '0'))
	if ANS.count(0) != 0:
		ANS.remove(0)
	print(len(ANS))
	print(*ANS)


for i in range(int(input())):
	s = input()
	print(len(s) - s.count('0'))
	print(' '.join([s[x] + '0' * (len(s) - 1 - x) for x in range(len(s)) if s[x] != '0']))


T = int(input())
inp = []
while T:
	x = int(input())
	inp.append(x)
	T -= 1
for i in inp:
	y = 10
	x = len(str(i))
	result = []
	while x:
		rem = i % y
		if rem != 0:
			result.append(rem)
		i = i - rem
		y = y * 10
		x -= 1
	print(len(result))
	print(*result)


from math import *
t = int(input())
for i in range(t):
	n = input()
	o = []
	c = 0
	l = list(n)
	for i in range(len(l)):
		if l[i] != '0':
			c += 1
			o.append(int(int(l[i]) * pow(10, len(l) - 1 - i)))
	print(c)
	print(*o)


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


n = int(input())
for i in range(n):
	p = list(input())
	ans = []
	ins = len(p) - 1
	for i in p:
		temp = int(i) * pow(10, ins)
		ins -= 1
		if temp > 0:
			ans.append(temp)
	print(len(ans))
	for i in ans:
		print(i, end=' ')
	print('')


import math
t = int(input())
while t:
	t -= 1
	n = int(input())
	d = []
	k = 0
	z = 0
	while n:
		q = n % 10
		if q:
			d.append(q * 10 ** z)
			k += 1
		z += 1
		n //= 10
	print(k)
	for e in d:
		print(e, end=' ')
	print()


for i in range(int(input())):
	lt = []
	x = input()
	l = len(x)
	y = int(x)
	for z in range(l - 1, -1, -1):
		c = y // 10 ** z
		if c:
			lt.append(str(c * 10 ** z))
			y -= c * 10 ** z
		else:
			pass
	print(len(lt))
	print(' '.join(lt))


for _ in range(int(input())):
	n = input()
	res = []
	res_len = 0
	rr = 0
	for num in n[::-1]:
		if num != '0':
			res.append(int(num) * 10 ** res_len)
			rr += 1
		res_len += 1
	print(rr)
	print(*res)


n = int(input())
for i in range(n):
	a = input()
	l = []
	for j in range(len(a)):
		l.append(int(a[-1 - j]) * 10 ** j)
	b = l.count(0)
	for j in range(b):
		l.remove(0)
	s = ''
	for j in range(len(l)):
		s = s + str(l[j])
		s = s + ' '
	print(len(l))
	print(s)


t = int(input())
for _ in range(0, t):
	n = int(input())
	lis = []
	power = 10
	while n:
		x = n % power
		n = n - x
		power = power * 10
		lis.append(x)
	count = lis.count(0)
	for i in range(0, count):
		lis.remove(0)
	print(len(lis))
	for i in range(0, len(lis)):
		print(lis[i], end=' ')
	print('')


for _ in range(int(input())):
	n = int(input())
	a = []
	b = []
	while n != 0:
		t = n % 10
		a.append(t)
		n = n // 10
	for i in range(len(a)):
		if a[i] != 0:
			if i != 0:
				b.append(10 ** i * a[i])
			else:
				b.append(a[i])
	print(len(b))
	print(*b)


t = int(input())
for j in range(t):
	n = int(input())
	s = []
	c = 0
	while n > 0:
		rem = n % 10
		if rem > 0:
			s.append(str(rem) + c * '0')
		c += 1
		n = n // 10
	print(len(s))
	for i in range(len(s)):
		print(s[i], end=' ')
	print()


cases = int(input())
y = 10
count = 0
result = []
while cases > 0:
	n = int(input())
	if n == 10000:
		count = 1
		result = ['10000']
	else:
		while n > 0:
			if n % y != 0:
				count += 1
				result.append(str(n % y))
			n = n - n % y
			y *= 10
	print(f"{count}\n{' '.join(result)}")
	result = []
	count = 0
	y = 10
	cases -= 1


t = int(input())
for i in range(t):
	n = input()
	p = len(n) - 1
	lis = []
	for item in n:
		x = int(item) * 10 ** p
		if x != 0:
			lis.append(x)
		p -= 1
	print(len(lis))
	for item in lis:
		print(item, end=' ')
	print()


n = int(input())
for i in range(n):
	num = int(input())
	ans = []
	t = 0
	while num:
		k = num % 10
		if k:
			ans.append(k * 10 ** t)
		num //= 10
		t += 1
	res = ' '
	print(len(ans))
	res = res.join(list(map(str, ans)))
	print(res)


t = int(input())
for i in range(t):
	n = int(input())
	c = 0
	cc = []
	for j in range(len(str(n))):
		p = n % 10
		n = n // 10
		if p != 0:
			cc.append(p * 10 ** j)
			c += 1
	print(c)
	print(*cc)


n = int(input())
j = [1, 2, 3, 4, 5, 6, 7, 8, 9]
for y in range(n):
	z = input()
	l = [int(i) for i in str(z)]
	ans = []
	start = 0
	for i in range(len(l) - 1, -1, -1):
		if l[i] in j and i == len(l) - 1:
			ans.append(l[i])
		if l[i] != 0 and i != len(l) - 1:
			ans.append(l[i] * 10 ** (len(l) - i - 1))
	print(len(ans))
	strings = [str(i) for i in ans]
	print(' '.join(strings))
	ans.clear()


t = int(input(''))
u = 0
while u < int(t):
	n = int(input(''))
	k = str(n)
	p = []
	for q in range(len(k)):
		if k[q] != '0':
			p.append(k[q] + '0' * (len(k) - q - 1))
	print(len(p))
	for a in range(len(p)):
		if a != len(p) - 1:
			print(int(p[a]), end=' ')
		else:
			print(int(p[a]))
	u += 1


t = int(input())
for i_0 in range(t):
	z = []
	n = str(input())
	if int(n) / 10 ** (len(n) - 1) == 0 or len(n) == 1:
		print(1)
		print(n)
	else:
		a = 1
		for i_1 in n:
			c = len(n) - a
			a += 1
			b = int(i_1) * 10 ** c
			if b != 0:
				z.append(str(b))
		print(len(z))
		z = ' '.join(z)
		print(z)
	del z


t = int(input())
cos = []
for i in range(0, t):
	a = int(input())
	u = []
	k = 1
	b = 0
	while a > 0:
		i = a % 10
		if i != 0:
			u.append(i * k)
			k *= 10
			b += 1
			a = a // 10
		else:
			k *= 10
			a = a // 10
	cos.append(b)
	cos.append(' '.join((str(x) for x in u)))
for m in range(0, len(cos)):
	print(cos[m])


for i in range(int(input())):
	n = int(input())
	if n > 1000:
		t = n % 1000
		if t == 0:
			print(1)
			print(n)
		else:
			s = t % 100
			if s == 0:
				print('2')
				print(n - t, t)
			else:
				k = s % 10
				if k == 0:
					if t - s == 0:
						print('2')
						print(n - t, s)
					else:
						print('3')
						print(n - t, t - s, s)
				elif t - s == 0 and s - k == 0:
					print('2')
					print(n - t, k)
				elif t - s == 0:
					print('3')
					print(n - t, s - k, k)
				elif s - k == 0:
					print('3')
					print(n - t, t - s, k)
				else:
					print('4')
					print(n - t, t - s, s - k, k)
	elif n > 100 and n < 1000:
		t = n % 100
		if t == 0:
			print('1')
			print(n - t)
		else:
			s = n % 10
			if s == 0:
				print('2')
				print(n - t, t)
			elif t - s == 0:
				print('2')
				print(n - t, s)
			else:
				print('3')
				print(n - t, t - s, s)
	elif n > 10 and n < 100:
		t = n % 10
		if t == 0:
			print('1')
			print(n - t)
		else:
			print('2')
			print(n - t, t)
	else:
		print('1')
		print(n)


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


for i in range(int(input())):
	n = int(input())
	s = str(n)
	c = len(s)
	v = ''
	x = []
	if c == 1 or s.count('0') == c - 1:
		print('1')
		print(n)
	else:
		for i in range(c):
			v = str(int(s[i]) * 10 ** (c - i - 1))
			if v != '0':
				x.append(v)
		print(len(x))
		print(*x)


n = int(input())
a = [int(input()) for i in range(n)]
for elem in a:
	print(len(str(elem)) - str(elem).count('0'))
	for i in range(len(str(elem))):
		if str(elem)[i] != '0':
			print(int(str(elem)[i] + '0' * (len(str(elem)) - i - 1)))


ansArr = []
for _ in range(int(input())):
	n = input()
	ans = ''
	while int(n) // 10 != 0:
		n = str(n)
		ans += n[0] + '0' * (len(n) - 1) + ' '
		n = int(n) - int(n[0] + '0' * (len(n) - 1))
	ans += str(n) if n != 0 else ''
	ansArr.append(len(ans.split()))
	ansArr.append(ans)
for x in ansArr:
	print(x)


def no_round(x):
	length = len(x)
	count = 0
	zeros = 0
	list_x = []
	for i in x:
		if i == '0':
			length = length - 1
			zeros = zeros + 1
			count = count + 1
			continue
		list_x.append(i + '0' * (length - 1))
		count = count + 1
		length = length - 1
	print(count - zeros)
	print(' '.join(list_x))
	return
import sys

def main():
	n_cases = None
	for line in sys.stdin:
		if not n_cases:
			n_cases = line
			continue
		line = line.strip()
		line = line.rstrip()
		no_round(line)
main()


for _ in range(int(input())):
	n = int(input())
	x = n % 10
	f = list(str(n))
	s = []
	for i in range(len(f)):
		s.append(int(f[i] + '0' * (len(f) - i - 1)))
	res = []
	for i in s:
		if i != 0:
			res.append(i)
	print(len(res))
	print(*res, sep=' ')


t = int(input())
for i in range(t):
	num = int(input())
	intial = 1
	arr = []
	counter = 0
	while num > 0:
		temp = num % 10
		num = num // 10
		if temp != 0:
			temp = temp * intial
			arr.append(temp)
			counter += 1
		intial = intial * 10
	print(counter)
	for i in arr:
		print(i, end=' ')


testCount = int(input())
for _ in range(testCount):
	n = int(input())
	addendums = []
	currentBase = 1
	while currentBase <= n:
		currentBase *= 10
		addendum = n % currentBase
		if addendum > 0:
			n -= addendum
			addendums.append(addendum)
	print(len(addendums))
	print(*addendums)


def comp():
	n = input()
	n = n[::-1]
	l = [[int(n[i]), pow(10, i)] for i in range(len(n)) if n[i] != '0']
	print(len(l))
	for i in range(len(l)):
		print(l[i][0] * l[i][1], end=' ')
m = int(input())
for i in range(m):
	comp()


list1 = []
n = int(input(''))
for i in range(0, n):
	ele = input()
	list1.append(ele)
for i in list1:
	count = 0
	for s in range(0, len(i)):
		if i[s] != '0':
			count = count + 1
	print(count)
	temp = int(i)
	a = temp % 10
	if a != 0:
		print(a, end=' ')
	temp = temp // 10
	b = temp % 10
	if b != 0:
		print(b * 10, end=' ')
	temp = temp // 10
	c = temp % 10
	if c != 0:
		print(c * 100)
	temp = temp // 10
	d = temp % 10
	if d != 0:
		print(d * 1000)
	temp = temp // 10
	e = temp % 10
	if e != 0:
		print(e * 10000)


import sys
import math
from collections import defaultdict

def solve(test):
	n = int(input())
	res = []
	unit = 1
	while n:
		r = n % 10
		if r:
			res.append(str(r * unit))
		unit *= 10
		n //= 10
	print(len(res))
	print(' '.join(res))
test_cases = int(input())
for t in range(1, test_cases + 1):
	solve(t)


t = int(input())
while t:
	num = input()
	l = len(num)
	n = int(num)
	ans = []
	i = 0
	while n > 0:
		r = n % 10
		if r != 0:
			p = 10 ** i
			ans.append(r * p)
		i += 1
		n = n // 10
	print(len(ans))
	print(*ans)
	t -= 1