#include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); freopen("password.in", "r", stdin); freopen("password.out", "w", stdout); int n, i, x; string s; int cnt[10]; cin>>n>>s; for (i = 0; i < 10; ++i) cnt[i] = count(s.begin(), s.end(), ('0' + i)); x = *max_element(cnt, cnt + 10); vector sols; for (i = 0; i < 10; ++i) if (cnt[i] == x) sols.push_back(string(cnt[i], '0' + i)); cout<