#include using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,x; cin>>n; map ct; for (int i=0; i<10*n*5; i++) cin>>x, ct[x]++; vector ret; for (auto &[k,v] : ct) if(v>2*n) ret.push_back(k); if(ret.empty()) { cout<<-1<<"\n"; return 0; } for (auto &e : ret) cout<