#include using namespace std; long long a[1000000]; int main() { int t; cin>>t; while (t--) { long long v; cin>>v; long long w = v; long long cut = 0; int p =0; while (w) { cut+=w%10; w/=10; } for (long long i=1;i<=cut;i++) { if (cut%i==0&&v%i==0) { a[p++]=i; } } cout<