#include <bits/stdc++.h>   using namespace std;   const int N = 1e6 + 10, OO = 0x3f3f3f3f;   int dx[] = {1, 0, -1, 0};   int dy[] = {0, 1, 0, -1};   int tc, n, m;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     string s;     cin >> tc;     while (tc--) {       cin >> n >> m;       cin >> s;       vector<long long> freq(n + 1, 0);       vector<int> indx(m);       for (int i = 0; i < int(m); i++) {         cin >> indx[i];         freq[0]++;         freq[indx[i]]--;       }       freq[0]++;       for (int i = int(1); i <= int(n - 1); i++) freq[i] += freq[i - 1];       vector<long long> karakter(26, 0);       for (int i = 0; i < int(n); i++) karakter[s[i] -  a ] += freq[i];       for (int i = 0; i < int(26); i++) cout << karakter[i] <<    ;       cout <<   n ;     }     return 0;   }   