#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i cnt(8, 0); string N; cin >> N; for(char &n : N){ cnt[1]++; cnt[int(n - 'A' + 2)]++; } auto itr = max_element(cnt.begin(), cnt.end()); vector ans; rep(i, 0, 8){ if(*itr == cnt[i]){ ans.push_back(i); } } int n = ans.size(); rep(i, 0, n){ cout << ans[i]; cout << (i == n-1 ? '\n' : ' '); } return 0; }