#include using namespace std; #define ALL(x) x.begin(),x.end() #define rep(i,n) for(int i=0;i<(n);i++) #define debug(v) cout<<#v<<":";for(auto x:v){cout<bool chmax(T &a,const T &b){if(abool chmin(T &a,const T &b){if(b v; rep(i,3){ ll num=0; for(auto c:a[i]){ num=num*10; num+=(c-'0'); } v.push_back(num); } sort(ALL(v)); vector vv; rep(i,3)for(int j=i+1;j<3;j++)vv.push_back(v[i]+v[j]); sort(ALL(vv));reverse(ALL(vv)); cout<