#include<stdio.h>
main()
{
int i,n,m,a[100];
while(scanf("%d%d",&n,&m)!=EOF)
{
for(i=0;i<=n;i++)
{
scanf("%d",&a[i]);
}
i=n;
while(m<a[i]&&i>=0)
{
a[i+1]=a[i];
i--;
}
a[i]=m;
for(i=0;i<n+1;i++)
printf("%d",a[i]);
printf("%d\n",a[i]);
}
return 0;
}