Problem: 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 ≤ n ≤ 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 ≤ t ≤ 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 ≤ n ≤ 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 

Solution (in PYTHON3):

Solution:
from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
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): 
      
    # Create a boolean array "prime[0..n]" and initialize 
    #  all entries it as true. A value in prime[i] will 
    # finally be false if i is Not a prime, else true. 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
          
        # If prime[p] is not changed, then it is a prime 
        if (prime[p] == True): 
              
            # Update all multiples of p 
            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:
		# if(l[val]!=-1):
		# 	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)

if __name__ == '__main__':
	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)