#include #include #include using namespace std; int main(){ long long n; cin >> n; long long p = 1ll< s; while(p--){ int x; cin >> x; s.insert(x); } vector ans; while(n--){ auto v = *next(s.begin()); ans.push_back(v); for(auto j = begin(s); j != end(s); ++j){ auto x = *j; auto it = prev(s.upper_bound(x+v)); if(it == j || *it != x+v){ cout << "impossible" << endl; return 0; } s.erase(it); } } for(auto x : ans) cout << x << endl; }