#include using namespace std; using ll = long long; using Graph = vector>; using edge = pair; using djikstra = priority_queue, greater>; const int INF = 2000000001; const ll LINF = 9*1e+18; const int mod = (1e+9)+7; const int lmod = 998244353; int gcd(int a, int b){ if(a%b == 0){ return b; } else { return gcd(b, a%b); } } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; string s; while(n--){ cin >> s; for(int i=0; i