#include <stdio.h>

void ordena_per_seleccio(double v[], int m);

int main() {
	int m, n;
	while (scanf("%d %d", &m, &n) > 0) {
    int i;
    double v[n];
    for (i = 0; i < n; ++i) scanf("%lf", &v[i]);
    ordena_per_seleccio(v, m);
    for (i = 0; i < n; ++i) printf(" %.4lf", v[i]);
    printf("\n");
	}
	return 0;
}
