#include <iostream>
using namespace std;
const int MAX_SIZE = 100;
void interchangeNumbs(int& firstNum, int& secondNum) {
int aux = firstNum;
firstNum = secondNum;
secondNum = aux;
}
void sortSequence(int cars[], int m) {
for (int i = 0; i < m; ++i) {
for (int j = i + 1; j < m; ++j) {
if (cars[i] > cars[j]) {
interchangeNumbs(cars[i], cars[j]);
}
}
}
}
void nonEquality(int n, int m) {
if (n - m > 0) {
for (int i = 0; i < n - m; ++i) {
cout << -1 << ' ';
}
} else if (n - m < 0) {
cout << "\nMaine veniti mai dimineata la birou :(";
}
}
int main() {
int n, m, cars[MAX_SIZE];
cin >> n >> m;
for (int i = 0; i < m; ++i) {
cin >> cars[i];
}
sortSequence(cars, m);
for (int i = 0; i < n && i <= m - 1; ++i) {
cout << cars[i] << ' ';
}
nonEquality(n, m);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IE1BWF9TSVpFID0gMTAwOwoKdm9pZCBpbnRlcmNoYW5nZU51bWJzKGludCYgZmlyc3ROdW0sIGludCYgc2Vjb25kTnVtKSB7CglpbnQgYXV4ID0gZmlyc3ROdW07CglmaXJzdE51bSA9IHNlY29uZE51bTsKCXNlY29uZE51bSA9IGF1eDsKfQoKdm9pZCBzb3J0U2VxdWVuY2UoaW50IGNhcnNbXSwgaW50IG0pIHsKCWZvciAoaW50IGkgPSAwOyBpIDwgbTsgKytpKSB7CgkJZm9yIChpbnQgaiA9IGkgKyAxOyBqIDwgbTsgKytqKSB7CgkJCWlmIChjYXJzW2ldID4gY2Fyc1tqXSkgewoJCQkJaW50ZXJjaGFuZ2VOdW1icyhjYXJzW2ldLCBjYXJzW2pdKTsKCQkJfQoJCX0KCX0KfQoKdm9pZCBub25FcXVhbGl0eShpbnQgbiwgaW50IG0pIHsKCWlmIChuIC0gbSA+IDApIHsKCQlmb3IgKGludCBpID0gMDsgaSA8IG4gLSBtOyArK2kpIHsKCQkJY291dCA8PCAt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