#include <stdio.h>
int main()
{
int a[100] = {23, 45, 60, 67, 88}, len = 5;
int value;
int i, type, j;
while (scanf ("%d", &value)){
if (value < 0)break;
for (i = 0; i < len; ++i){
if (value == a[i]){
type = 1;
break;
}
else if (a[i] > value){
type = 2;
break;
}
}
if (i >= len){
a[len++] = value;
}
else {
if (type == 1){
for (j = i; j < len-1; ++j){
a[j] = a[j+1];
}
len--;
}
else if (type == 2){
for (j = len; j > i; --j){
a[j] = a[j-1];
}
len++;
a[i] = value;
}
}
for (i = 0; i < len; ++i){
printf ("%5d", a[i]);
}
printf ("\n");
if (len >= 100){
printf ("More than 100!\n");
break;
}
}
}