#include<iostream> #include<algorithm> #include<cstdio> using namespace std; int shu[1000010]; int main(){ int i,a,b; while(scanf("%d %d",&a,&b)!=EOF){ for( i=0;i<a;i++) scanf("%d",&shu[i]); sort(shu,shu+a); while(--b) printf("%d ",shu[--i]); printf("%d\n",shu[--i]); } return 0; }