#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; for(int j=n*10;j>=1;j--){ if((n*pot[dig(j)]+j)%(n+j)==0){ print(j); break; } } } // return 0; }