#include #define int ll using namespace std; #define rep(i,n) for(int i=0;i=0;i--) #define fi first #define se second #define pb push_back #define sz(a) (int)a.size() #define vec(...) vector<__VA_ARGS__> #define _3k5NXAD ios::sync_with_stdio(0),cin.tie(0) typedef long long ll; using pii=pair; using vi=vector; void print(){cout<<'\n';} template void print(const h&v,const t&...u){cout<>t; rep(cs,t){ int n; cin>>n; rng(j,2,1000){ if((n*pot[dig(j*n)]+j*n)%(n+j*n)==0){ print(j*n); break; } } } // return 0; }