#include <bits/stdc++.h> using namespace std; int T, q, n, t[3000005][65], cnt[3000005], idx; char s[3000005]; int getnum(char x) { if (x >= 'A' && x <= 'Z') return x - 'A'; else if (x >= 'a' && x <= 'z') return x - 'a' + 26; else return x - '0' + 52; } void insert(...