#include #include using namespace std; int main(){ int q,j; cin >> q; while(q--) { string s; cin>>s; int f[10]={0},min=0; for(int i=min;i