#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) #define RREP(i, n) for(int i=(n-1); i>=0; i--) int M; signed main() { cin >> M; vector S(1<> S[i]; vector P(1< Q(1<