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:
//package practice.codeforce.round_640_div4.A;

import java.io.*;
import java.math.BigInteger;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class Solution {

    class Solver {
        public void solve(InputReader in, OutputWriter out) {
            int t = in.readInt();
            for (int i = 0; i < t; i++) {
                int n = in.readInt();
                List<Integer> addents = new LinkedList<>();
                int k = 1;
                while (n > 0) {
                    int mod = n % 10;
                    if (mod != 0) {
                        addents.add(mod * k);
                    }
                    n /= 10;
                    k *= 10;
                }
                out.printLine(addents.size());
                for (Integer addent : addents) {
                    out.print(addent + " ");
                }
                out.printLine();
            }

        }
    }

    public static void main(String[] args) {
        Solution t = new Solution();
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        try {
            if (IS_LOCAL) {
                String packagePath = ROOT + t.getClass().getCanonicalName().replace("." + t.getClass().getSimpleName(), "")
                        .replace(".", "/");
                String inputFileName = packagePath + "/" + INPUT;
                String outputFileName = packagePath + "/" + OUTPUT;

                File inputFile = new File(inputFileName);
                inputStream = new FileInputStream(inputFile);
                Logger.printfln("Reading from file: %s", inputFile.getAbsolutePath());
                File outputFile = new File(outputFileName);
                outputStream = new FileOutputStream(outputFile, false);
                Logger.printfln("Writing to file: %s", outputFile.getAbsolutePath());
            } else {
                Logger.println("Reading stdin and writing to stdout");
            }
        } catch (IOException e) {
            Logger.println(e.toString());
            Logger.println("Reading stdin and writing to stdout");
        }

        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        long start = System.currentTimeMillis();
        new Solution().new Solver().solve(in, out);
        Logger.println(System.currentTimeMillis() - start + "ms");
        out.close();
    }

    public static final boolean IS_LOCAL = false;
    public static String ROOT = "/home/lorderot/projects/algo_problems/src/main/java/";
    public static String INPUT = "input.txt";
    public static String OUTPUT = "output.txt";
}

class IOUtils {
    public static int[] readIntArray(InputReader in, int size) {
        int[] array = new int[size];
        for (int i = 0; i < size; i++)
            array[i] = in.readInt();
        return array;
    }

    public static long[] readLongArray(InputReader in, int size) {
        long[] array = new long[size];
        for (int i = 0; i < size; i++)
            array[i] = in.readLong();
        return array;
    }

    public static int[][] readIntTable(InputReader in, int rowCount, int columnCount) {
        int[][] table = new int[rowCount][];
        for (int i = 0; i < rowCount; i++)
            table[i] = readIntArray(in, columnCount);
        return table;
    }

    public static BigInteger[] readBigInt(InputReader in, int size) {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(in.stream)));
        BigInteger[] arr = new BigInteger[size];
        for (int i = 0; i < size; i++) {
            arr[i] = sc.nextBigInteger();
        }
        return arr;
    }

    public static double[] readDoubleArray(InputReader in, int size) {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(in.stream)));
        double[] arr = new double[size];
        for (int i = 0; i < size; i++) {
            arr[i] = sc.nextDouble();
        }
        return arr;
    }
}

class InputReader {

    InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long readLong() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public static boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public String next() {
        return readString();
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}

class Logger {

    public static void println(Object o) {
        if (!Solution.IS_LOCAL) {
            return;
        }
        System.err.println(o);
    }

    public static void print(Object o) {
        if (!Solution.IS_LOCAL) {
            return;
        }
        System.err.print(o);
    }

    public static void printf(String s, Object... objects) {
        if (!Solution.IS_LOCAL) {
            return;
        }
        System.err.printf(s, objects);
    }

    public static void printfln(String s, Object... objects) {
        if (!Solution.IS_LOCAL) {
            return;
        }
        System.err.println(String.format(s, objects));
    }
}