#include using namespace std; #include using namespace atcoder; using ll = long long; using P = pair; #define fix(x) fixed << setprecision(x) #define asc(x) x, vector, greater #define rep(i, n) for(ll i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() templatebool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;} templatebool chmax(T&a, const T&b){if(a> t; while(t--){ int cnt = 0, n; string s; cin >> n >> s; s += 'z'+1; auto x = z_algorithm(s); for(int i=1;i