include[HTML_REMOVED]
using namespace std;
int main() {
int t;
cin >> t;
vector < int > id;
while (cin >> t) {
id.push_back(t);
}
sort(id.begin(), id.end());
for (int i = 0; i < id.size(); i) {
if (id[i] + 2 == id[i + 1]) {
cout << id[i] + 1 << ” “;
}
}
for (int i = 0; i < id.size(); i) {
if (id[i] == id[i + 1]) {
cout << id[i];
}
}
}