include
using namespace std; bool solve1(long long small,long long big){ int s=0; while(small>0){ s+=small%10; small/=10; } int k = 0; while(big>0){ k+=big%10; big/=10; } // cout<<s<<" "<<k<<'\n'; if(s==k){ return true; }else return false; } void solve(){ long long n; cin>>n; for(long long i=1;i<n;i++){ cout<<i<<'\n'; if(solve1(i,n-i)){ // cout<<'\n'; cout<<i<<" "<<n-i<<'\n'; return; } } } int main() { int t; cin>>t; while(t--){ solve(); }