#include using namespace std; using ll=long long; bool is_th(string N){ ll s=0; for(auto n:N)s+=(n-'0'); return s%3==0; } void ext(string &N){ int SN=N.size(); for(int i=0;i=0;i--){ if(N[i]!='0'){ N[i]--; for(int j=i+1;j>N; ll SN=N.size(); for(int i=0;i