Sereja has an array a, consisting of n integers a1, a2, ..., an. The boy cannot sit and do nothing, he decided to study an array. Sereja took a piece of paper and wrote out m integers l1, l2, ..., lm (1 ≤ li ≤ n). For each number li he wants to know how many distinct numbers are staying on the positions li, li + 1, ..., n. Formally, he want to find the number of distinct numbers among ali, ali + 1, ..., an.?

Sereja wrote out the necessary array elements but the array was so large and the boy was so pressed for time. Help him, find the answer for the described question for each li.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 105). The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 105) — the array elements.

Next m lines contain integers l1, l2, ..., lm. The i-th line contains integer li (1 ≤ li ≤ n).

Output

Print m lines — on the i-th line print the answer to the number li.

Examples

Input

10 10
1 2 3 4 1 2 3 4 100000 99999
1
2
3
4
5
6
7
8
9
10


Output

6
6
6
6
6
5
4
3
2
1
//package Mura;
/*BY MURAD*/
import com.sun.javafx.collections.MappingChange;
import com.sun.org.apache.xerces.internal.util.SymbolHash;
import javafx.util.Pair;
import java.io.*;
import java.security.PublicKey;
import java.util.*;
import java.io.File;
import java.io.PrintStream;

import static java.lang.Integer.min;
import static java.lang.Integer.parseInt;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.util.BitSet;
public class Code {
   static class Graph {
       private int v;
       private ArrayList<Integer> adj[];
       Graph(int vv) {
           v = vv;
           adj = new ArrayList[v];
           for (int i = 0; i < v; ++i)
               adj[i] = new ArrayList<>();
       }
           void addEdge(int v, int w) {
               adj[v].add(w);
               adj[w].add(v);
           }
       }
    public static void main(String[] args)throws IOException {
        //Solution ob=new Solution();
        Scanner inp = new Scanner(System.in);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        Queue<Integer>ans=new LinkedList<>();
        Set<Integer>set=new HashSet<>();
        int n=Integer.parseInt(st.nextToken()),m=Integer.parseInt(st.nextToken());
        int []a=new int[n];
        int aa[]=new int[n];
        int c=1;
        st=new StringTokenizer(br.readLine());
        for(int i=0;i<n;i++)
        {
            a[i]=Integer.parseInt(st.nextToken());
        }
        for(int i=n-1;i>=0;i--){
            set.add(a[i]);
            aa[i]=set.size();
        }

        for(int i=0;i<m;i++)
        {
            st=new StringTokenizer(br.readLine());
            int x=Integer.parseInt(st.nextToken());
            System.out.println(aa[x-1]);
        }
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
    static class Friend implements Comparable<Friend>{
        int m;
        int f;
        public Friend(int m, int f){
            this.m = m;
            this.f = f;
        }
        @Override
        public int compareTo(Friend f) {
            return this.m - f.m;
        }
    }
    public static int[] bctsort(int[] array, int bucketCount) {
        if (bucketCount <= 0) throw new IllegalArgumentException("Invalid bucket count");
        if (array.length <= 1) return array;
        int high = array[0];
        int low = array[0];
        for (int i = 1; i < array.length; i++) {
            if (array[i] > high) high = array[i];

            if (array[i] < low) low = array[i];
        }
        double interval = ((double)(high - low + 1))/bucketCount;
        ArrayList<Integer> buckets[] = new ArrayList[bucketCount];
        for (int i = 0; i < bucketCount; i++) {

            buckets[i] = new ArrayList();

        }
        for (int i = 0; i < array.length; i++) {

            buckets[(int)((array[i] - low)/interval)].add(array[i]);
        }
        int pointer = 0;

        for (int i = 0; i < buckets.length; i++) {

            Collections.sort(buckets[i]);

            for (int j = 0; j < buckets[i].size(); j++) {

                array[pointer] = buckets[i].get(j);

                pointer++;

            }
        }
        return array;
    }
    /*
      int maxValueInMap=(Collections.max(mp.values()));  // This will return max value in the Hashmap
        for (Map.Entry<String, Integer> entry : mp.entrySet()) {  // Itrate through hashmap
            if (entry.getValue()==maxValueInMap) {
                System.out.println(entry.getKey());
                break;
            }
        }
        //vector of vector
        ArrayList <Integer> al [] = (ArrayList <Integer> []) new ArrayList[100001];
    */
}