#include using namespace std; #include #include #include #include #include template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } #define rep(i,n) for (int i = 0; i < (n); ++i) typedef long long ll; typedef long double ld; typedef unsigned long long ull; using P=pair; const ll INF=1001001001; const int mod=1e9+7; void solve(){ string s; cin>>s; int n=s.size(); reverse(s.begin(),s.end()); vectord(1000); int sz=0; rep(i,n){ int k=s[i]-'A'+10; rep(j,4){d[sz++]=k%2;k/=2;} } while(sz%3){d[sz++]=0;} vectorcnt(8); for(int i=0;ians; rep(i,8){ if(mx==cnt[i]){ ans.push_back(i); } } rep(i,ans.size()){ if(i){cout<<" ";} cout<