#include
#include
#include
bool ToLess(int a, int b) {
return a > b;
}
int main() {
int count;
std::cin >> count;
std::vector vectorOfNombers(count);
for (size_t i = 0; i != count; ++i) {
std::cin >> vectorOfNombers[i];
}
sort(vectorOfNombers.begin(), vectorOfNombers.begin() + count / 2 - 1); sort(vectorOfNombers.begin() + count / 2, vectorOfNombers.end(), ToLess);
for (size_t i = 0; i != count; ++i) {
std::cout << vectorOfNombers[i] << " ";<br> }
}