#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    int k2 = (n + 1) / 2;
    vector<int> a(n);
    for (auto& i : a) cin >> i;

    sort(a.begin(), a.end());
    vector<int> dif;
    for (auto i : a) {
        if (dif.size() == 0 || i != dif[dif.size() - 1]) {
            dif.push_back(i);
        }
    }
    if (dif.size() == k2) {
        for (auto i : dif) cout << i << " ";
        cout << endl;
    } else {
        cout << "-1\n";
    }
    return 0;
}
