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.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

    private static InputReader in;
    private static OutputWriter out;

    public static void main(String[] args) {
        in = new InputReader(System.in);
        out = new OutputWriter(System.out);

        int testcase = 1;

        while (testcase-- > 0) {
            solve();
        }

        out.flush();

        in.close();
        out.close();
    }

    private static void solve() {
        int t = in.nextInt();
        while (t-- > 0) {
            int n = in.nextInt();
            List<Integer> roundNumbers = new ArrayList<>();
            int r = 10;
            while (n != 0){
                if(n % r == 0){
                    r*=10;
                }else{
                    int m = n % r;
                    roundNumbers.add(m);
                    n -= m;
                }
            }
            out.println(roundNumbers.size());
            roundNumbers.forEach(k -> out.print(k + " "));
            out.println();
        }
    }

    private static int getCommonMax(List<Integer> a, List<Integer> b){
        List<Integer> common = new ArrayList<>(a);
        common.retainAll(b);
        return Collections.max(common);
    }

    private static List<Integer> getDivisors(int n) {

        double sqrt = Math.sqrt(n);
        List<Integer> divisors = new ArrayList<>();

        for (int i = 1; i <= sqrt; i++) {
            if (n % i == 0) {
                divisors.add(i);
                if (n / i != i) {
                    divisors.add(n / i);
                }
            }
        }

        return divisors;
    }
    private static List<Long> getDivisors(long n) {

        double sqrt = Math.sqrt(n);
        List<Long> divisors = new ArrayList<>();

        for (long i = 1; i <= sqrt; i++) {
            if (n % i == 0) {
                divisors.add(i);
                if (n / i != i) {
                    divisors.add(n / i);
                }
            }
        }

        return divisors;
    }
    private static class Pair<K, V> {
        private K first;
        private V second;

        public Pair(K first, V second) {
            this.first = first;
            this.second = second;
        }

        public K getFirst() {
            return first;
        }

        public void setFirst(K first) {
            this.first = first;
        }

        public V getSecond() {
            return second;
        }

        public void setSecond(V second) {
            this.second = second;
        }
    }
    private static long gcd(long a, long b) {
        while (b > 0) {
            long temp = b;
            b = a % b;
            a = temp;
        }
        return a;
    }

    private static long gcd(long[] input) {
        long result = input[0];
        for(int i = 1; i < input.length; i++){
            result = gcd(result, input[i]);
        }
        return result;
    }

    private static long lcm(long a, long b) {
        return a*(b / gcd(a, b));
    }

    private static long lcm(long[] input) {
        long result = input[0];
        for(int i = 1; i < input.length; i++){
            result = lcm(result, input[i]);
        }
        return result;
    }

    static class InputReader {
        private 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 nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            res = (int) getResult(c, res);

            return res * sgn;
        }

        public int[] nextIntArray(int arraySize) {
            int array[] = new int[arraySize];

            for (int i = 0; i < arraySize; i++)
                array[i] = nextInt();

            return array;
        }

        public long nextLong() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sign = 1;

            if (c == '-') {
                sign = -1;

                c = read();
            }

            long result = 0;

            result = getResult(c, result);

            return result * sign;
        }

        private long getResult(int c, long result) {
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                result *= 10;
                result += c & 15;

                c = read();
            } while (!isSpaceChar(c));
            return result;
        }

        public long[] nextLongArray(int arraySize) {
            long array[] = new long[arraySize];

            for (int i = 0; i < arraySize; i++)
                array[i] = nextLong();

            return array;
        }

        public float nextFloat() // problematic
        {
            float result, div;
            byte c;

            result = 0;
            div = 1;
            c = (byte) read();

            while (c <= ' ')
                c = (byte) read();

            boolean isNegative = (c == '-');

            if (isNegative)
                c = (byte) read();

            do {
                result = result * 10 + c - '0';
            } while ((c = (byte) read()) >= '0' && c <= '9');

            if (c == '.')
                while ((c = (byte) read()) >= '0' && c <= '9')
                    result += (c - '0') / (div *= 10);

            if (isNegative)
                return -result;

            return result;
        }

        public double nextDouble() // not completely accurate
        {
            double ret = 0, div = 1;
            byte c = (byte) read();

            while (c <= ' ')
                c = (byte) read();

            boolean neg = (c == '-');

            if (neg)
                c = (byte) read();

            do {
                ret = ret * 10 + c - '0';
            } while ((c = (byte) read()) >= '0' && c <= '9');

            if (c == '.')
                while ((c = (byte) read()) >= '0' && c <= '9')
                    ret += (c - '0') / (div *= 10);

            if (neg)
                return -ret;

            return ret;
        }

        public String next() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            StringBuilder res = new StringBuilder();

            do {
                res.appendCodePoint(c);

                c = read();
            } while (!isSpaceChar(c));

            return res.toString();
        }

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

        public String nextLine() {
            int c = read();

            StringBuilder result = new StringBuilder();

            do {
                result.appendCodePoint(c);

                c = read();
            } while (!isNewLine(c));

            return result.toString();
        }

        public boolean isNewLine(int c) {
            return c == '\n';
        }

        public void close() {
            try {
                stream.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }

    static class OutputWriter {
        private PrintWriter writer;

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

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

        public void println(int x) {
            writer.println(x);
        }

        public void print(int x) {
            writer.print(x);
        }

        public void println(int array[], int size) {
            for (int i = 0; i < size; i++)
                println(array[i]);
        }

        public void print(int array[], int size) {
            for (int i = 0; i < size; i++)
                print(array[i] + " ");
        }

        public void println(long x) {
            writer.println(x);
        }

        public void print(long x) {
            writer.print(x);
        }

        public void println(long array[], int size) {
            for (int i = 0; i < size; i++)
                println(array[i]);
        }

        public void print(long array[], int size) {
            for (int i = 0; i < size; i++)
                print(array[i]);
        }

        public void println(float num) {
            writer.println(num);
        }

        public void print(float num) {
            writer.print(num);
        }

        public void println(double num) {
            writer.println(num);
        }

        public void print(double num) {
            writer.print(num);
        }

        public void println(String s) {
            writer.println(s);
        }

        public void print(String s) {
            writer.print(s);
        }

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

        public void printSpace() {
            writer.print(" ");
        }

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

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

    }

}