#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int i=0; int n=0; vector <int> a; while(cin>>n) { a.push_back(n); } int len=a.size(); int z=a[len-1]; a.pop_back(); sort(a.begin(),a.end()); for(i=0;i<z;i++) { cout<<a[i]; if(i!=z-1) { cout<<" "; } } return 0; }