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

Solution:
import java.util.*;
import java.math.*;
import java.io.*;
import java.text.*; 
 public class A{

    static FastReader scan=new FastReader();
   public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
  



static int d,n,m; 
static int arr[];
static int findMaxOddSubarraySum(int arr[], int n) 
{ 
    // Here min_odd is the minimum odd number  
    // (in absolute terms). Initializing with  
    // max value of int . 
    int min_odd = Integer.MAX_VALUE; 
  
    // To check if there is al-least 
    // one odd number. 
    boolean isOdd = false; 
      
    // To store sum of all positive elements 
    int sum = 0;  
    for (int i = 0 ; i < n ; i++) 
    { 
        // Adding positive number would 
        // increase the sum. 
        if (arr[i] > 0) 
            sum = sum + arr[i]; 
  
        // To find the minimum odd number 
        // (absolute) in the array. 
        if (arr[i] % 2 != 0) 
        { 
            isOdd = true; 
            if (min_odd > Math.abs(arr[i])) 
                min_odd = Math.abs(arr[i]); 
        } 
    } 
  
    // If there was no odd number 
    if (isOdd == false) 
    return 0; 
  
    // Now, sum will be either odd or even. 
    // If even, changing it to odd.  
    // As, even - odd = odd. 
    // since m is the minimum odd 
    // number(absolute). 
    if (sum % 2 == 0) 
        sum = sum - min_odd; 
  
    return sum; 
} 
static BigInteger mod=new BigInteger("2");
static BigInteger a=new BigInteger("1");
static BigInteger z=new BigInteger("0");
static long solve(BigInteger i){
    if(i.equals(a))return 0;
if(i.mod(mod).equals(z))
    return solve(i.divide(mod))+1;
else return solve(i.add(a))+1;
}
public static void main(String[] args)  throws Exception 
{
int t=scan.nextInt();
while(t-->0){
int a=scan.nextInt();
int pow=1;
ArrayList<Integer>arr=new ArrayList<Integer>();
while(a>0)
{
    if((a%10)*pow!=0)
arr.add((a%10)*pow);
a/=10;

    pow*=10;
}
//out.println(a);
out.println(arr.size());
for(int i=0;i<arr.size();i++)
{
    out.print(arr.get(i)+" ");
}
out.println();
}



 out.close();








  

}
 public static  long pow(long b, long e) {
            long r = 1;
            while (e > 0) {
                if (e % 2 == 1) r = r * b ;
                b = b * b;
                e >>= 1;
            }
            return r;
        }
private static void sort(long[] arr) {
        List<Long> list = new ArrayList<>();
        for (long object : arr) list.add(object);
        Collections.sort(list);
        for (int i = 0; i < list.size(); ++i) arr[i] = list.get(i);
    }
 public static class FastReader {
        BufferedReader br;
        StringTokenizer root;
        
 
        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
 
        String next() {
            while (root == null || !root.hasMoreTokens()) {
                try {
                    root = new StringTokenizer(br.readLine());
                } catch (Exception addd) {
                    addd.printStackTrace();
                }
            }
            return root.nextToken();
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (Exception addd) {
                addd.printStackTrace();
            }
            return str;
        }
         public int[] nextIntArray(int arraySize) {
            int array[] = new int[arraySize];
 
            for (int i = 0; i < arraySize; i++) {
                array[i] = nextInt();
            }
 
            return array;
        }
}
static class pair{
    int i;
    int j;
pair(int i,int j){
    this.i=i;
    this.j=j;
}

}}