/* Code by Pranjal Rai : @Ashtam Swar */ #include using namespace std; typedef long long ll; #define pb push_back #define ff first #define ss second #define M 1e9+7 #define inf 1e18 int a[26]; int main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int t,n,m,q,i,j,k,x,y,z; // ifstream fin ("input8_try.txt", ifstream::binary); // ofstream fout ("output8_try.txt", ofstream::binary); cin>>t; while(t--) { memset(a,0,sizeof a); string s; cin>>s; n=s.length(); for(i=0;i()); int ans=n; for(i=1;i<=26;i++) { if(n%i==0) { x=n/i; y=0; for(j=0;j