func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 3e5 + 5;   const int inf = 0x3f3f3f3f;   const int mod = 1e9 + 7;   int T, n, m;   string s;   int vis[26];   int pos[maxn][26];   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     cin >> T;     while (T--) {       memset(vis, 0, sizeof(vis));       cin >> n >> m;       for (int i = 0; i < 26; ++i) {         for (int j = 0; j <= n + 5; ++j) {           pos[j][i] = 0;         }       }       cin >> s;       for (int i = 0; i < s.size(); ++i) {         for (int j = 0; j < 26; ++j) {           pos[i][j] = pos[i - 1 == -1 ? 0 : i - 1][j];         }         pos[i][s[i] -  a ]++;       }       for (int i = 0, x; i < m; ++i) {         cin >> x;         x--;         for (int j = 0; j < 26; ++j) {           vis[j] += pos[x][j];         }       }       for (int j = 0; j < 26; ++j) {         vis[j] += pos[n - 1][j];       }       for (int i = 0; i < 26; ++i) {         cout << vis[i] <<    ;       }       cout <<   n ;     }     return 0;   }   