#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#pragma GCC optimize("03")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,bmi2,fma")

using namespace std;
//using namespace __gnu_pbds;

//gp_gash_table<int,int>mp;
#define ll long long
#define pb push_back
#define ld long double
#define endl '/n'
#define all(a) a.begin(), a.end()

const ll INF = 2e18, MOD = 1e9 + 7, MAXN = 2e5;

vector<int>xx = {1,1,1,0,0,-1,-1,-1};
vector<int>yy = {1,0,-1,1,-1,-1,0,1};

bool ok(int x, int y) {
    return x >= 0 && x < 10 && y >= 0 && y < 10;
}


void solve() {
    ll n;
    cin >> n;
    vector<ll> a(n);
    for (ll i = 0 ; i< n; i++) {
        cin >> a[i];
    }
    sort(all(a));
    ll m = unique(all(a)) - a.begin();
    if (n == m * 2 -1) {
        for (int i = 0; i < m; i++) {
            cout << a[i] << " ";
        }
    } else {
        cout << -1;
    }
}

int main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll t = 1;
    // cin >> t;
    while(t--) {
        solve();
    }
}