Problem: You want to perform the combo on your opponent in one popular fighting game. The combo is the string s consisting of n lowercase Latin letters. To perform the combo, you have to press all buttons in the order they appear in s. I.e. if s="abca" then you have to press 'a', then 'b', 'c' and 'a' again.

You know that you will spend m wrong tries to perform the combo and during the i-th try you will make a mistake right after p_i-th button (1 ≤ p_i < n) (i.e. you will press first p_i buttons right and start performing the combo from the beginning). It is guaranteed that during the m+1-th try you press all buttons right and finally perform the combo.

I.e. if s="abca", m=2 and p = [1, 3] then the sequence of pressed buttons will be 'a' (here you're making a mistake and start performing the combo from the beginning), 'a', 'b', 'c', (here you're making a mistake and start performing the combo from the beginning), 'a' (note that at this point you will not perform the combo because of the mistake), 'b', 'c', 'a'.

Your task is to calculate for each button (letter) the number of times you'll press it.

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 10^4) — the number of test cases.

Then t test cases follow.

The first line of each test case contains two integers n and m (2 ≤ n ≤ 2 ⋅ 10^5, 1 ≤ m ≤ 2 ⋅ 10^5) — the length of s and the number of tries correspondingly.

The second line of each test case contains the string s consisting of n lowercase Latin letters.

The third line of each test case contains m integers p_1, p_2, ..., p_m (1 ≤ p_i < n) — the number of characters pressed right during the i-th try.

It is guaranteed that the sum of n and the sum of m both does not exceed 2 ⋅ 10^5 (∑ n ≤ 2 ⋅ 10^5, ∑ m ≤ 2 ⋅ 10^5).

It is guaranteed that the answer for each letter does not exceed 2 ⋅ 10^9.

Output

For each test case, print the answer — 26 integers: the number of times you press the button 'a', the number of times you press the button 'b', ..., the number of times you press the button 'z'.

Example

Input


3
4 2
abca
1 3
10 5
codeforces
2 8 3 2 9
26 10
qwertyuioplkjhgfdsazxcvbnm
20 10 1 2 3 5 10 5 9 4


Output


4 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 9 4 5 3 0 0 0 0 0 0 0 0 9 0 0 3 1 0 0 0 0 0 0 0 
2 1 1 2 9 2 2 2 5 2 2 2 1 1 5 4 11 8 2 7 5 1 10 1 5 2 

Note

The first test case is described in the problem statement. Wrong tries are "a", "abc" and the final try is "abca". The number of times you press 'a' is 4, 'b' is 2 and 'c' is 2.

In the second test case, there are five wrong tries: "co", "codeforc", "cod", "co", "codeforce" and the final try is "codeforces". The number of times you press 'c' is 9, 'd' is 4, 'e' is 5, 'f' is 3, 'o' is 9, 'r' is 3 and 's' is 1.

Solution (in JAVA):

Solution:
//package com.company;
import java.io.*;
import java.util.*;

public class Main {
    static FastReader sc = new FastReader(System.in);
    static Output out = new Output(System.out);

    static class FastReader implements InputReader {
        final private int BUFFER_SIZE = 1<<16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer;
        private int bytesRead;

        public FastReader(InputStream is) {
            din = new DataInputStream(is);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public int nextInt() {
            int ret = 0;
            byte c = skipToDigit();
            boolean neg = (c=='-');
            if(neg) {
                c = read();
            }
            do {
                ret = ret*10+c-'0';
            } while((c = read())>='0'&&c<='9');
            if(neg) {
                return -ret;
            }
            return ret;
        }

        private boolean isDigit(byte b) {
            return b>='0'&&b<='9';
        }

        private byte skipToDigit() {
            byte ret;
            while(!isDigit(ret = read())&&ret!='-') ;
            return ret;
        }

        private void fillBuffer() {
            try {
                bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            }catch(IOException e) {
                e.printStackTrace();
                throw new InputMismatchException();
            }
            if(bytesRead==-1) {
                buffer[0] = -1;
            }
        }

        private byte read() {
            if(bytesRead==-1) {
                throw new InputMismatchException();
            }else if(bufferPointer==bytesRead) {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }

    }

    static interface InputReader {
        int nextInt();

    }

    static class Output implements Closeable, Flushable {
        public StringBuilder sb;
        public OutputStream os;
        public int BUFFER_SIZE;
        public String lineSeparator;

        public Output(OutputStream os) {
            this(os, 1<<16);
        }

        public Output(OutputStream os, int bs) {
            BUFFER_SIZE = bs;
            sb = new StringBuilder(BUFFER_SIZE);
            this.os = new BufferedOutputStream(os, 1<<17);
            lineSeparator = System.lineSeparator();
        }

        public void println(int i) {
            println(String.valueOf(i));
        }

        public void println(long i) {
            println(String.valueOf(i));
        }

        public void println(String s) {
            sb.append(s);
            println();
            if(sb.length()>BUFFER_SIZE >> 1) {
                flushToBuffer();
            }
        }

        public void println() {
            sb.append(lineSeparator);
        }

        private void flushToBuffer() {
            try {
                os.write(sb.toString().getBytes());
            }catch(IOException e) {
                e.printStackTrace();
            }
            sb = new StringBuilder(BUFFER_SIZE);
        }

        public void flush() {
            try {
                flushToBuffer();
                os.flush();
            }catch(IOException e) {
                e.printStackTrace();
            }
        }

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

    }

    static TreeMap<Integer, Integer> M = new TreeMap<>();
    static TreeSet<Integer>set = new TreeSet<>();

    static void addSize(int s) {
        M.put(s, M.getOrDefault(s, 0) + 1);
    }

    static void removeSize(int s) {
        int v = M.get(s) - 1;
        if (v == 0) M.remove(s);
        else M.put(s, v);
    }

    static int value() {
        return set.last() - set.first() - M.lastKey();
    }

    static int nextInt() {
        return sc.nextInt();
    }

    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);

        int t = scanner.nextInt();
        while(t-- > 0) {

            int n = scanner.nextInt();
            int m = scanner.nextInt();

            String s = scanner.next();
            int[] arr = new int[m];

            for(int i =0; i < m;i++)
                arr[i] = scanner.nextInt();
            int[][] dp = new int[26][s.length()];
            for(int i =0; i < s.length();i++)
                for(int j =0; j < 26;j++)
                {
                    if(i==0)
                        dp[j][i]= j==(s.charAt(i)-'a')?1:0;
                    else
                        dp[j][i] = dp[j][i-1]+(j==(s.charAt(i)-'a')?1:0);
                }
            int[] letters = new int[26];
            for(int i =0; i < m; i++)
                for(int j =0;j<26;j++)
                {
                    letters[j] += dp[j][arr[i]-1];
                }
            for(int j =0;j<26;j++)
            {
                letters[j] += dp[j][s.length()-1];
            }
            for(int i =0; i < 26; i++)
                System.out.print(letters[i]+" ");
            System.out.println();



        }
        //out.close();
    }

    public static long calc(int[] N, int k) {
        long s = 0;
        int j = N.length;
        for(int i =0;i<N.length;i++){
            j = Math.max(j, i + 1);
            while (j - 1 > i && N[i] + N[j-1] >= k)
                j--;
            s += (long)(N.length - j);
            //dbg(i,j);
        }
        //dbg(s);
        return s;
    }
        public static int solve(List<Integer> list, int val)
        {
            if(list.get(list.size()-1)<val) return Integer.MAX_VALUE;
            if(list.get(0)>=val) return 0;
            int start = -1;
            int end = list.size();
            int sol = Integer.MAX_VALUE;
            while(start+1<end)
            {
                int mid = start + (end-start)/2;
                if(list.get(mid)>=val)
                {
                    end = mid;
                    sol = mid;
                }else{
                    start =mid;
                }
            }
            return sol;
        }

        public static int solve1(List<Integer> list, int val)
        {
            if(list.get(list.size()-1)<=val) return list.size()-1;
            if(list.get(0)>val) return -1;
            int start = -1;
            int end = list.size();
            int sol = -1;
            while(start+1<end)
            {
                int mid = start + (end-start)/2;
                if(list.get(mid)<=val)
                {
                    start = mid;
                    sol = mid;
                }else{
                    end =mid;
                }
            }
            return sol;
        }

















}