Let's suppose you have an array a, a stack s (initially empty) and an array b (also initially empty).

You may perform the following operations until both a and s are empty:

  * Take the first element of a, push it into s and remove it from a (if a is not empty); 
  * Take the top element from s, append it to the end of array b and remove it from s (if s is not empty). 



You can perform these operations in arbitrary order.

If there exists a way to perform the operations such that array b is sorted in non-descending order in the end, then array a is called stack-sortable.

For example, [3, 1, 2] is stack-sortable, because b will be sorted if we perform the following operations:

  1. Remove 3 from a and push it into s; 
  2. Remove 1 from a and push it into s; 
  3. Remove 1 from s and append it to the end of b; 
  4. Remove 2 from a and push it into s; 
  5. Remove 2 from s and append it to the end of b; 
  6. Remove 3 from s and append it to the end of b. 



After all these operations b = [1, 2, 3], so [3, 1, 2] is stack-sortable. [2, 3, 1] is not stack-sortable.

You are given k first elements of some permutation p of size n (recall that a permutation of size n is an array of size n where each integer from 1 to n occurs exactly once). You have to restore the remaining n - k elements of this permutation so it is stack-sortable. If there are multiple answers, choose the answer such that p is lexicographically maximal (an array q is lexicographically greater than an array p iff there exists some integer k such that for every i < k qi = pi, and qk > pk). You may not swap or change any of first k elements of the permutation.

Print the lexicographically maximal permutation p you can obtain.

If there exists no answer then output -1.

Input

The first line contains two integers n and k (2 ≤ n ≤ 200000, 1 ≤ k < n) — the size of a desired permutation, and the number of elements you are given, respectively.

The second line contains k integers p1, p2, ..., pk (1 ≤ pi ≤ n) — the first k elements of p. These integers are pairwise distinct.

Output

If it is possible to restore a stack-sortable permutation p of size n such that the first k elements of p are equal to elements given in the input, print lexicographically maximal such permutation.

Otherwise print -1.

Examples

Input

5 3
3 2 1


Output

3 2 1 5 4 

Input

5 3
2 3 1


Output

-1


Input

5 1
3


Output

3 2 1 5 4 

Input

5 2
3 4


Output

-1
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Vector;
import java.util.Collection;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.TreeSet;
import java.util.Stack;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pradyumn
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] start = in.nextIntArray(k);
            MiscUtils.decreaseByOne(start);
            TreeSet<Integer> remaining = new TreeSet<>();
            Stack<Integer> stack = new Stack<>();
            ArrayList<Integer> input = new ArrayList<>();
            int resElement = 0;

            for (int i = 0; i < n; ++i) remaining.add(i);
            for (int ss : start) {
                remaining.remove(ss);
                input.add(ss);
            }

            for (int ss : start) {
                stack.push(ss);
                while (!stack.isEmpty() && stack.peek() == resElement) {
                    ++resElement;
                    stack.pop();
                }
            }

            while (!remaining.isEmpty()) {
                while (!stack.isEmpty() && stack.peek() == resElement) {
                    ++resElement;
                    stack.pop();
                }
                if (stack.isEmpty()) {
                    stack.add(remaining.pollLast());
                    input.add(stack.peek());
                } else {
                    Integer lower = remaining.lower(stack.peek());
                    if (lower == null) {
                        out.println(-1);
                        return;
                    }
                    stack.push(lower);
                    input.add(lower);
                    remaining.remove(lower);
                }
                while (!stack.isEmpty() && stack.peek() == resElement) {
                    ++resElement;
                    stack.pop();
                }
            }
            if (!stack.isEmpty()) {
                out.println(-1);
                return;
            }
            int[] aa = CollectionUtils.toArray(input);
            MiscUtils.increaseByOne(aa);
            ArrayUtils.printArray(out, aa);
        }

    }

    static class MiscUtils {
        public static void decreaseByOne(int[]... arrays) {
            for (int[] array : arrays) {
                for (int i = 0; i < array.length; i++) {
                    array[i]--;
                }
            }
        }

        public static void increaseByOne(int[]... arrays) {
            for (int[] array : arrays) {
                for (int i = 0; i < array.length; i++) {
                    array[i]++;
                }
            }
        }

    }

    static class ArrayUtils {
        public static void printArray(PrintWriter out, int[] array) {
            if (array.length == 0) return;
            for (int i = 0; i < array.length; i++) {
                if (i != 0) out.print(" ");
                out.print(array[i]);
            }
            out.println();
        }

    }

    static class CollectionUtils {
        public static int[] toArray(Collection<Integer> collection) {
            int[] array = new int[collection.size()];
            int index = 0;
            for (int element : collection) {
                array[index++] = element;
            }
            return array;
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;

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

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

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

        public int[] nextIntArray(int n) {
            int[] array = new int[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextInt();
            }
            return array;
        }

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

    }
}

