Problem: n children are standing in a circle and playing a game. Children's numbers in clockwise order form a permutation a1, a2, ..., an of length n. It is an integer sequence such that each integer from 1 to n appears exactly once in it.

The game consists of m steps. On each step the current leader with index i counts out ai people in clockwise order, starting from the next person. The last one to be pointed at by the leader becomes the new leader.

You are given numbers l1, l2, ..., lm — indices of leaders in the beginning of each step. Child with number l1 is the first leader in the game. 

Write a program which will restore a possible permutation a1, a2, ..., an. If there are multiple solutions then print any of them. If there is no solution then print -1.

Input

The first line contains two integer numbers n, m (1 ≤ n, m ≤ 100).

The second line contains m integer numbers l1, l2, ..., lm (1 ≤ li ≤ n) — indices of leaders in the beginning of each step.

Output

Print such permutation of n numbers a1, a2, ..., an that leaders in the game will be exactly l1, l2, ..., lm if all the rules are followed. If there are multiple solutions print any of them. 

If there is no permutation which satisfies all described conditions print -1.

Examples

Input

4 5
2 3 1 4 4


Output

3 1 2 4 


Input

3 3
3 1 2


Output

-1

Note

Let's follow leadership in the first example: 

  * Child 2 starts. 
  * Leadership goes from 2 to 2 + a2 = 3. 
  * Leadership goes from 3 to 3 + a3 = 5. As it's greater than 4, it's going in a circle to 1. 
  * Leadership goes from 1 to 1 + a1 = 4. 
  * Leadership goes from 4 to 4 + a4 = 8. Thus in circle it still remains at 4. 

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
import static java.lang.Math.*;
 
public class Sol {
 
    static long mod = 1000000007;
    
    public static void main(String args[]) throws Exception {
        //Scanner in;
        InputReader in;
        PrintWriter w;
        boolean online = false;
        String fileName = "input";
 
        if (online) {
            //in=new Scanner(new File(fileName + ".in"));
            in = new InputReader(new FileInputStream(new File(fileName + ".in")));
            w = new PrintWriter(new FileWriter("out.txt"));
        } else {
            //in=new Scanner(System.in);
            in = new InputReader(System.in);
            w = new PrintWriter(System.out);
        }
        
        //int T = in.nextInt();
        //in.nextLine();
        int T = 1;
        
        for (int t = 1; t <= T; t++) {
            int n=in.nextInt(); int m=in.nextInt();
            int l[]=new int[m];
            
            boolean v[]=new boolean[101];
            
            for(int i=0;i<m;i++) l[i]=in.nextInt();
            
            int a[]=new int[n+1];
            int flag=0;
            
            for(int i=0;i<m-1;i++)
            {
                if(l[i+1] <= l[i])
                {
                    int x=l[i+1]%n;
                    int y=n-l[i];
                    if(x+y == 0) x=n;
                    
                    if(v[x+y] && a[l[i]]==0) 
                    {
                        flag=1;
                        break;
                    }
                    
                    if(a[l[i]]==0) a[l[i]]=x+y;
                    else 
                    {
                        if(a[l[i]]!=(x+y))
                        {
                            flag=1;
                            break;
                        }
                    }
                    
                    v[x+y] = true;
                }
                else
                {
                    int x=l[i+1]-l[i];
                    
                    if(v[x] && a[l[i]]==0) 
                    {
                        flag=1;
                        break;
                    }
                    
                    if(a[l[i]]==0) a[l[i]]=x;
                    else 
                    {
                        if(a[l[i]]!=x)
                        {
                            flag=1;
                            break;
                        }
                    }
                    
                    v[x]=true;
                }
            }
            
            if(flag==1) w.println("-1");
            else
            {
                int ind=1;
                
                for(int i=1;i<=n;i++)
                {
                    if(a[i]==0)
                    {
                        while(v[ind]) ind++;
                        
                        a[i]=ind;
                        v[ind]=true;
                    }
                }
                
                for(int i=1;i<=n;i++) w.print(a[i]+" ");
            }
        }
 
        w.close();
    }
 
    static int arr[];
    static int size[];
 
    static void initialize(int n) {
        for (int i = 0; i <= n; i++) {
            arr[i] = i;
            size[i] = 1;
        }
    }
 
    static int root(int r) {
        while (arr[r] != r) {
            arr[r] = arr[arr[r]];
            r = arr[r];
        }
 
        return r;
    }
 
    static void union(int u, int v) {
        int r1 = root(u);
        int r2 = root(v);
 
        if (r1 != r2) {
            if (size[r1] < size[r2]) {
                arr[r1] = arr[r2];
                size[r2] += size[r1];
            } else {
                arr[r2] = arr[r1];
                size[r1] += size[r2];
            }
        }
    }
 
    private static long gcd(long a, long b) {
        while (b > 0) {
            long temp = b;
            b = a % b; // % is remainder
            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;
    }
 
    public static void Array_2dsort(Integer[][] a) {
        Arrays.sort(a, new Comparator<Integer[]>() {
            public int compare(Integer[] int1, Integer[] int2) {
                Integer numOfKeys1 = int1[1];       //about which column u want to sort
                Integer numOfKeys2 = int2[1];
                return numOfKeys1.compareTo(numOfKeys2);
            }
        });
    }
 
    static long powmod(long x, long n, long m) //(a/b)%mod = (a * (b^(m-2))%mod  here --> x=a, n=mod-2, m=mod  
    {
        if (n == 0) {
            return 1;
        } else if (n % 2 == 0) {
            return powmod(((x % m) * (x % m)) % m, n / 2, m);
        } else if (n % 2 == 1) {
            return (((x % m) * powmod(((x % m) * (x % m)) % m, (n - 1) / 2, m)) % m);
        } else {
            return 0;
        }
    }
 
    static class InputReader {
 
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
 
        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 String nextLine() {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
 
        public int nextInt() {
            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 nextLong() {
            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 double nextDouble() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E') {
                    return res * Math.pow(10, nextInt());
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E') {
                        return res * Math.pow(10, nextInt());
                    }
                    if (c < '0' || c > '9') {
                        throw new InputMismatchException();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
 
        public String readString() {
            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) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
 
        public String next() {
            return readString();
        }
 
        public interface SpaceCharFilter {
 
            public boolean isSpaceChar(int ch);
        }
 
    }
 
}