#include using namespace std; using ll=long long; using pll=pair; using tll=tuple; using ld=long double; const ll INF=(1ll<<60); #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define all(v) v.begin(),v.end() template void chmin(T &a,T b){ if(a>b){ a=b; } } template void chmax(T &a,T b){ if(a v; ll mx=1e8; rep(i,30){ if(mx now={x,y,z,(__int128)x*y,(__int128)y*z,(__int128)x*z,(__int128)x*y*z}; for(auto l:now){ if(mx> n; vector> dp(n,vector(sz,0)); vector> pre(n,vector(sz)); rep(i,sz) dp[0][i]=INF; rep(i,n-1){ rep(j,sz){ if(dp[i][j]==0) continue; for(ll k=j+1;k ans={v[nj]}; while(ni!=0){ tie(ni,nj)=pre[ni][nj]; ans.push_back(v[nj]); } reverse(all(ans)); rep(i,n){ cout << ans[i] << ' '; } cout << '\n'; }