You are developing a new feature for the website which sells airline tickets: being able to sort tickets by price! You have already extracted the tickets' prices, so there's just the last step to be done...You are given an array of integers. Sort it in non-descending order.

The input consists of a single line of space-separated integers. The first number is n (1 ≤ n ≤ 10) — the size of the array. The following n numbers are the elements of the array (1 ≤ ai ≤ 100).

Output space-separated elements of the sorted array.

NoteRemember, this is a very important feature, and you have to make sure the customers appreciate it!

#pragma warning(disable:4786)
#pragma warning(disable:4996)
#include<list>
#include<bitset>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<functional>
#include<string>
#include<cstring>
#include<cstdlib>
#include<queue>
#include<utility>
#include<fstream>
#include<sstream>
#include<cmath>
#include<stack>
#include<assert.h>
using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))
#define CLR(a) memset(a, 0, sizeof(a))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define ABS(X) ( (X) > 0 ? (X) : ( -(X) ) )
#define S(X) ( (X) * (X) )
#define SZ(V) (int )V.size()
#define FORN(i, n) for(i = 0; i < n; i++)
#define FORAB(i, a, b) for(i = a; i <= b; i++)
#define ALL(V) V.begin(), V.end()
#define IN(A, B, C)  ((B) <= (A) && (A) <= (C))

typedef pair<int,int> PII;
typedef pair<double, double> PDD;
typedef vector<int> VI;
typedef vector<PII > VP;

#define AIN(A, B, C) assert(IN(A, B, C))

//typedef int LL;
typedef long long int LL;
//typedef __int64 LL;

int main() {

	int sum = 0;
	for (int i = 1; i <= 100000000; i++) {
		sum += rand();
	}

	if (sum == 0) return 0;

	int n;
	scanf("%d", &n);
	VI V;
	V.clear();
	for (int i = 0; i < n; i++) {
		int b;
		scanf("%d", &b);
		V.push_back(b);
	}
	sort(ALL(V));
	for (int i = 0; i < n; i++) {
		if (i) printf(" ");
		printf("%d", V[i]);
	}
	printf("\n");
}

#include<iostream>
#include<vector>
#include<cmath>
#include<string>
#include<ctime>

using namespace std;

void main() {
	unsigned int time = clock();
	int n;
	cin >> n;
	int *a = new int[n];
	for (int k = 0; k < n; k++)cin >> a[k];
	for (int i = 0; i < n; i++) {
		int min = a[i], min_i = i;
		for (int j = i; j < n; j++)
			if (a[j] < min) min = a[j], min_i = j;
		int buf = a[i];
		a[i] = a[min_i];
		a[min_i] = buf;
	}
	while (clock() - time < 1001);
	for (int i = 0; i < n; i++)cout << a[i] << ' ';

}

#include<bits/stdc++.h>
using namespace std;
int mn=9999999,mx=0;
bool f = false;
int main()
{
    ios_base::sync_with_stdio(0);
    int n;
    cin >> n;
    int arr[n];
    for( int i=0;i<n;i++ )
   {
       cin >> arr[i];
   }
   while( clock()*1000/CLOCKS_PER_SEC < 1400 ){}
   	sort(arr,arr+n);
   for( int i=0;i<n;i++ )
   {
       cout<<arr[i]<<" ";
   }
}

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <ctime>

using namespace std;
typedef long long ll;

void pause(int dur) {
    int temp = time(NULL) + dur;
    while(temp > time(NULL));
}

int main() {
  ios::sync_with_stdio(0);
  int n; cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];

  sort(a.begin(), a.end());
  pause(2);
  for (auto x : a)
    cout << x << ' ';
  cout << endl;

  return 0;
}

#include<cstdio>
#include<algorithm>
using namespace std;

int n;
int a[1111];

int main() {
	int n; scanf("%d", &n);
	for(int i=0;i<n;i++) scanf("%d", &a[i]);
	sort(a,a+n);
	for(int i=0;i<2135555555;i++) a[n]+=i;
	for(int i=0;i<n;i++) printf("%d%c", a[i], i<n-1 ? ' ' : '\n');

	return 0;
}

#include <cstdio>
#include <cmath>
#include <queue>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <ctime>
using namespace std;
inline int read()
{
	int l = 0, f = 1;
	char a = getchar();
	for (; a < '0' || a > '9'; a = getchar())
		if (a == '-') f = -1;
	for (; a >= '0' && a <= '9'; a = getchar())
		l = l*10+a-48;
	return l*f;
}
int main(int argc, char const *argv[])
{
	int ti = clock();
	int n = read(), a[105];
	for (int i = 1; i <= n; ++i) a[i] = read();
	sort(a+1, a+1+n);
	while(clock()-ti < 1500);
	for (int i = 1; i <= n; ++i)
	{
		if (i != n) cout << a[i] << " ";
		else cout << a[i];
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n,i;
int ar[12];
int main(){

    cin>>n;
    for(i=0;i<n;i++){
        cin>>ar[i];

    }
    sort(ar,ar+n);
    for(i=0;i<n;i++){
        //cout<<ar[i]<<"\n";
        printf("%d ",ar[i]);

    }
    for (i=1;i<=30000000;i++)
		printf(" ");
    return 0;

}

#include <bits/stdc++.h>

using namespace std;
#define fr first
#define sc second
#define sz(c) int(c.size())
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define vlong long long
int a[20];

int main() {
	int n;
	scanf("%d" , &n);
	for (int i = 0; i < n; ++i) {
		scanf("%d", &a[i]);
	}
	sort(a, a + n);
	clock_t t;
	t = clock();
	while(1)
	{
		clock_t t1 = clock() - t;
		double ans = ((double)t1)/1000;
		if(ans > 2.001)break;
	}
	for (int i = 0; i < n; ++i) {
		printf("%d%c", a[i], i == n - 1 ? '\n' : ' ');
	}
}

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#define speed ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace std;
int main() {
	speed;
	int n, v, ar[10000];
	cin >> n;
	int cnt = 1000000000 / 1.8;
	while (cnt--) {
		int c = cnt + 1e6;
		ar[0] = c;
	}
	for (int i = 0; i < n; ++i)
		cin >> ar[i];
	sort(ar, ar + n);
	for (int i = 0; i < n; ++i)
		cout << ar[i] << ' ';
}

#include <bits/stdc++.h>
#define f(a, n) for (int a=0; a<n; a++)
#define F(a, n) for (int a=1; a<=n; a++)
using namespace std;
int n, A[10], cnt;
//trying harder
/*
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
Documentation might make the file size larger? Wut?
*/
int main(){
	cin.tie(NULL);
	ios::sync_with_stdio(0);
	try{
	cin>>n;
	f(i, 500000000) {cnt+=31415;cnt%=1337;}
	f(i, n){
		cin>>A[i];
	}
	sort (A, A+n);
	f(i, n){
		cout<<A[i]<<" ";
	}
	cout<<endl;
}
	catch(exception e){}
}

#include <bits/stdc++.h>
#include <chrono>
#include <thread>

using namespace std;

int main(int argc, char const *argv[])
{

	size_t number_of_elements;

	cin >> number_of_elements;

	vector<size_t> elements(number_of_elements);

	for (auto&& element: elements)
		cin >> element;

	sort(elements.begin(), elements.end());

	auto x = chrono::system_clock::now();

	while (true) {
		if (chrono::duration_cast<chrono::milliseconds>(chrono::system_clock::now() - x).count() > 1500)
			break;
	}

	cout << elements[0];

	for (size_t i = 1; i < number_of_elements; ++i)
		cout << " " << elements[i];
	cout << endl;

	return 0;
}

#include <bits/stdc++.h>

using namespace std;

#ifdef ONLINE_JUDGE
#define OJ 1
#else
#define OJ 0
#endif

#define dd				double
#define ll 				long long
#define pb 				push_back
#define mp 				make_pair
#define X				first
#define Y				second
#define forn( i, n ) 	for( ll i = 0; i < (ll) (n); i ++ )
#define endl 			'\n'

#define TIMESTAMP fprintf(stderr, "Execution time: %.3lf s.\n", (double)clock()/CLOCKS_PER_SEC)

struct __s { __s() {
		//srand( time( NULL ) );
		//freopen( "input.txt", "r", stdin ); //freopen( "output.txt", "w", stdout );
		if( OJ ) { ios_base::Init i; cin.sync_with_stdio( 0 ); cin.tie( 0 ); }
	} ~__s() {
		if( !OJ ) TIMESTAMP;
		ll n;
		cin >> n;
	}
} __S;

ll a[111111];

int main( void ) {
	ll n;
	cin >> n;
	ll m = 25111;
	forn( i, m ) {
		a[i] = rand() + 100;
	}
	forn( i, n ) {
		cin >> a[i];
	}
	forn( i, m ) {
		forn( j, m-1 ) {
			if( a[j] > a[j+1] ) {
				ll t = a[j];
				a[j] = a[j+1];
				a[j+1] = t;
			}
		}
	}
	forn( i, n ) {
		cout << a[i] << " ";
	}
	cout << endl;
	return 0;
}

#include <iostream>
#include <algorithm>
using namespace std;
int b = 1;
int main(){
int n;
cin >> n;
int arr[n];
for(int i = 0;i < n;i++){
    cin >> arr[i];
}
sort(arr,arr+n);

for(int i = 0;i < 2000000000;++i)b+=i;

for(int i = 0;i < n;++i){

cout << arr[i] << " ";
}
return 0;
}

#include <bits/stdc++.h>
#define int double
using namespace std;

int a[10000];

main()
{
    long long n;
    cin>>n;
    for (long long i=1; i<=n; i++)
        cin>>a[i];
   for (long long i=1; i<=n; i++)
   for (long long j=n-1; j>=i; j--)
   if (a[j]>a[j+1]) swap(a[j],a[j+1]);
     for (long long i=1; i<=n; i++)
        cout<<" "<<a[i];
    clock_t c=clock();
    while(clock()-c<CLOCKS_PER_SEC);
    return 0;
}

#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cctype>
#include <cassert>

#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <iterator>
#include <functional>
#include <numeric>

//#include <chrono>
#include <unordered_set>
#include <unordered_map>

using namespace std;

typedef long long int64;
typedef unsigned long long uint64;
typedef long double float64;

template<typename T> T sqr(T x) { return x*x; }
inline uint64 bit(int num) { return 1ull << num; }
#define mp make_pair
#define forn(i, n) for(int i = 0; i < int(n); ++i)
#define forr(i, n) for(int i = int(n) - 1; i >= 0; --i)
#define forit(i,c) for(i=(c).begin(); i!=(c).end(); ++i)
#define ALL(x) (x).begin(), (x).end()
#define zero(a) memset((a), 0, sizeof(a))

typedef vector<int> vint;
typedef vector<bool> vbool;
typedef vector<int64> vint64;
typedef pair<int, int> pii;
typedef pair<int64, int64> pii64;

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif

	int n;
	while (cin >> n)
	{
		vint v(n);
		forn(i, n)
		{
			cin >> v[i];
		}
		sort(ALL(v));

		forn(i, n)
		{
			if (i) cout << " ";
			cout << v[i];
		}
		cout << endl;

		forn(i, 500000000)
		{
			v[i%v.size()] *= i;
		}
	}

	return 0;
}

#include <algorithm>
#include <iostream>
#include <cstdio>
using namespace std;
int n;
int a[20];
long long k=1000000000;
int main()
{
	scanf("%d",&n);
	for(int i=0;i<n;i++) scanf("%d",&a[i]);
	for(int l=0;l<k;l++)
	{
		for(int i=0;i<n;i++)
		{
			for(int j=0;j<n;j++)
			{
				l++;
				if(j>0 && a[j]<a[j-1])
				{
					a[j-1]+=a[j];
					a[j]=a[j-1]-a[j];
					a[j-1]=a[j-1]-a[j];
				}
			}
		}
	}

	for(int i=0;i<n;i++) printf("%d ",a[i]);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>> n;
    int arr[n+1];
    for(int a=0;a<n;a++) cin>> arr[a];
    sort(arr,arr+n);
    cout<< arr[0];
    time_t t=time(NULL)+2;
    while(t>time(NULL)){int r=0;};
    for(int a=1;a<n;a++){
        cout<< " " << arr[a];
    }
    cout<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int n;
int a[1005];
int main(){
		//freopen("main.in","r",stdin);
		cin >> n;
		for(int i = 1; i <= n; i++) cin >> a[i];
		sort(a+1,a+n+1);
		int t = clock();
		while(clock() - t <= 1100);
		for(int i = 1; i <= n; i++)
				cout << a[i] << " ";
		cout << endl;
		return 0;
}

#include <cstdio>
#include <ctime>
#include <algorithm>
using namespace std;
const int N = 1e9;

int n;
int a[105];

int main()
{
	scanf("%d", &n);
	for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
	sort(a + 1, a + n + 1);

	clock_t start = clock();
	while (double(clock() - start) / CLOCKS_PER_SEC < 1.9) ;

	for (int i = 1; i <= n; ++i)
		printf("%d%c", a[i], " \n"[i == n]);
	return 0;
}

#include<iostream>
#include<cstdio>
#include<cmath>
#include<queue>
#include<cstring>
#include<queue>
#include<algorithm>
#include<ctime>
#include<map>
#define ll long long
using namespace std;
inline int read()
{
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-') f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0'; ch=getchar();}
    return x*f;
}

int a[132123];

int main()
{
    int n=read();time_t start = clock();
    for(int i=1;i<=n;i++)a[i]=read();
    sort(a+1,a+n+1);
    while((double)(clock()-start)/CLOCKS_PER_SEC<1.9);
    for(int i=1;i<=n;i++) cout<<a[i]<<" ";
    return 0;
}

#include <iostream>
#include <cstring>
#include <ctime>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;

#define LL long long int
#define MOD 1e09+7
const int MAXN = 1e05 + 7;
int v[MAXN];
LL n;
int main()
{
	cin >> n;
	int begin = clock();
	for (int i = 0; i < n; i++)
		cin >> v[i];
	sort(v, v + n);
	for (int p = 0; p < 10000000000; p++)
	{
		int end = clock();
		if ((end - begin)/CLOCKS_PER_SEC >= 1.1)
			break;
	}
	for (int i = 0; i < n; i++)
		cout << v[i] << " ";
	cout << endl;
	return 0;
}

/*input
3 3 1 2
*/
#include <iostream>
#include <iomanip>
#include <vector>
#include <conio.h>
#include <algorithm>

using namespace std;

int main () {
	long n;
	cin >> n;
	long mas[n];

	for (long i = 0; i < n; i++)
		cin >> mas[i];

	for (long i = 0; i < 20000000ll; i++){
	    int *j = new int[2];
	    delete[] j;
	}
	sort(mas, mas + n);

	for (long i = 0; i < n - 1; i++)
		cout << mas[i] << " ";

	cout << mas[n - 1];

	return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int> num(n);
	for (auto &x : num) cin >> x;

	while(clock() / CLOCKS_PER_SEC < 1.99);

	vector<int> cnt(101, 0);
	for (auto x : num) {
		++cnt[x];
	}

	for (int i = 1; i <= 100; ++i) {
		while (cnt[i]--) {
			cout << i << " ";
		}
	}
	cout << "\n";

	return 0;
}

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <stack>
#include <iostream>
using namespace std;
#define ll long long
#define clr(a,b) memset(a,b,sizeof(a))
#define fir first
#define se second
#define pb(x) push_back(x)
#define ALL(V) (V).begin(), (V).end()
typedef pair<ll, ll> pii;
typedef pair<ll, ll> pll;
typedef pair<double, ll> pdi;
typedef vector<ll> vi;
const ll mod = 1000000007;
const ll oo = 1e18;
//freopen("d:/in.txt", "r", stdin);
//freopen("d:/out.txt", "w", stdout);
//header 1.02
const int maxn = 1e5 + 10;

int main() {
	int n;
	cin >> n;
	vi v;
	for(int i = 1; i <= n; i++) {
		int tmp; cin >> tmp;
		v.pb(tmp);
	}
	int tmp = 0;
	for(int i = 1; i <= 89000000; i++) (tmp = (tmp + rand()) % 2);
	if(tmp) tmp = 0;
	sort(ALL(v));
	for(auto x:v) printf("%d ", x^tmp); puts("");
}

#include<iostream>

using namespace std;

const int MAXN = 120;

int n, a[MAXN];
//asd

int main(){
	cin >> n;
	int x = 1;
	for (int i = 0; i < 1000; i++)
		for (int j = 0; j < 1000; j++)
			for (int w = 0; w < 1000; w++)
				x = x * i^j;
	a[0] = x;
	for (int i = 0; i < n; i++)	cin >> a[i];
	for (int i = 0; i < n; i++)
		for (int j = 0; j + 1 < n; j++)
			if (a[j] > a[j + 1]){
				int temp = a[j];
				a[j] = a[j + 1];
				a[j + 1] = temp;
			}
	for (int i = 0; i < n; i++)
		cout << a[i] << " ";
	cout << endl;
	return 0;
}

/*************************************************************************
  >         File: F.cc
  >       Author: Yuan Lei
  >         Mail: yuanlei@indeed.com
  > Created Time: Sat Apr  1 02:07:17 2017
*************************************************************************/
#include <vector>
#include <cstdio>
#include <bitset>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <fstream>
#include <cstring>
#include <cassert>
#include <numeric>
#include <set>
#include <map>
#include <deque>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <string>
#include <iostream>
#include <algorithm>
#include <functional>
#include <iomanip>

int main() {
  std::ios::sync_with_stdio(0);
  int n;
  std::cin >> n;
  std::vector<int> A;
  for (int i = 0; i < n; ++i) {
    int x;
    std::cin >> x;
    A.push_back(x);
  }
  clock_t st = clock();
  while (1.0 * (clock() - st) / CLOCKS_PER_SEC < 1.5) {
    std::random_shuffle(A.begin(), A.end());
    std::sort(A.begin(), A.end());
  }
  for (int i = 0; i < n - 1; ++i) {
    std::cout << A[i] << ' ';
  }
  std::cout << A.back() << std::endl;
  return 0;
}

#include <bits/stdc++.h>
#define F first
#define S second
#define ld long douroote
#define pb push_back
#define ll long long
#define ull unsigned long long
#define INF 0x7f7f7f7f
#define sc(a) scanf("%d",&a)
#define scll(a) scanf("%lld",&a)
#define scc(a) scanf(" %c",&a)
#define scs(a) scanf(" %s",a)
#define me(a,b) memset(a,b,sizeof a)
#define all(a) a.begin(),a.end()
#define allr(a,n) a,a+n
#define loop(a,s,e) for(ll a=s;a<=e;a++)
#define read_arr(a,s,n) for(int i=s;i<n+s;i++){sc(a[i]);}
#define read_arr_ll(a,s,n) for(int i=s;i<n+s;i++){scll(a[i]);}
#define open(in,out) freopen(in,"r",stdin);freopen(out,"w",stdout);
#define err(a,s) cerr<<a<<s;
#define err_arr(a,s,n) for(int i=s;i<n+s;i++){cerr<<a[i]<<" ";}cerr<<endl;
#define prtll(x) printf("%lld",x);
#define prt(x) printf("%d",x);using namespace std;
using namespace std;
const ll mod=1000000007ll;
int a[100],n,c=1,b=2;
int fib(int x){
 if(x<=1){return x;}
 return fib(x-2)+fib(x-1);
}
int main(){
cin>>n;
read_arr(a,0,n);
sort(allr(a,n));
int ans=fib(43);
loop(i,1,1e6){ans+=ans--;}
cerr<<ans<<endl;
loop(i,0,n-1){cout<<a[i]<<" ";}
}
/**
1
4
1 1 3 4

1 3
2 4
3 2
4 2
5 3
6
**/

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
#include <ctime>

using namespace std;

long long n;
long long ans = 1;

int a[10005];
int read(){
	int x;
	scanf("%d", &x);
	return x;
}

int main(){
	int i, j;
	int ans = 0;

	clock_t start,finish;

	cin >> n;
    start=clock();

	for(i=1;i<=n;i++){
		cin >> a[i];
	}

	sort(a + 1, a + n + 1);

	while(clock() - start <= 1.5 * CLOCKS_PER_SEC){
		ans++;
	}

	for(i=1;i<=n;i++){
		cout << a[i] << " ";
	}

	return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
#include <ctime>

typedef long long ll;
typedef unsigned long long ull;

using namespace std;

int main(int argc, char const *argv[]) {
    ll n;
    cin >> n;
    vector<ll> v(n);
    for (ll i = 0; i < n; ++i) {
        cin >> v[i];
    }
    sort(v.begin(), v.end());

    clock_t start_t = clock();
    clock_t end_t = start_t + 1500;
    while(clock() < end_t)
        ;

    for (ll i = 0; i < n; ++i) {
        cout << v[i] << (i == n-1 ? '\n' : ' ');
    }

    return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:160777216")
#include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <cmath>
#include <string>
#include <cstdio>
#include <ctime>
#include <cstring>
#include <cstdlib>
#include <sstream>
#include <fstream>
#include <stack>
#define PI acos(-1.0)
#define VI vector<int>
#define PII pair<int,int>
#define MP make_pair
#define INF 1000000000000007LL
#define eps 1e-12
#define ll long long
#define f0(i , n) for (int i = 0; i < n; i++)
#define NMAX 500000

using namespace std;

int n, i, j, k;
int a[1111];

int main()
{
	cin >> n;
	for (i = 0; i < n; i++)
		cin >> a[i];

	for (i = 0; i <= 1000000000; i++)
	{
		swap(a[0], a[1]);
		if (i == 1000000000)
		{
			for (j = 0; j < n; j++)
				for (k = j + 1; k < n; k++)
					if (a[j] > a[k])
						swap(a[k], a[j]);
		}
	}
	for (i = 0; i < n; i++)
		cout << a[i] << " ";
	return 0;
}

#include <bits/stdc++.h>
#define MAXN 100000
#define base 31
#define MOD 1000000007
#define ll long long
using namespace std;
void bubbleSort(int* arr, int size)
{
    int tmp;

    for(int i = 0; i < size - 1; ++i) // i - номер прохода
    {
        for(int j = 0; j < size - 1; ++j) // внутренний цикл прохода
        {
            if (arr[j + 1] < arr[j])
            {
                tmp = arr[j + 1];
                arr[j + 1] = arr[j];
                arr[j] = tmp;
            }
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n, arr[1005]={0};
    ll ans=0;
    cin>>n;

    for(ll i=0; i<1000000000; i++)
    {
        if(i<n)cin>>arr[i];

    }
    bubbleSort(arr, n);
    for(int i=0; i<n-1; i++)
    {
        cout<<arr[i]<<' ';
    }
    cout<<arr[n-1]<<endl;
    return 0;

}

#pragma warning(disable : 4996) //_CRT_SECURE_NO_WARNINGS
#include <queue>
#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <fstream>
#include <set>
#include <deque>
#include <sstream>
#define sync ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ss second
#define ff first
#define ll long long
#define mp make_pair
#define endl "\n"
#define pb push_back
#define ld long double
#define M_PI 3.14159265358979323846
#define puss vector
const ld EPS = 0.9;
const ll INF = 1000000007;
using namespace std;
const int bsize = 80000;
puss<int> b(bsize);
int n;
puss<int> a;
int sortb(int p)
{
	for (int i = 0; i <bsize; i++)
		b[i] = bsize - i;
	p++;
	for (int i = 0; i<bsize; i++)
		for (int j = i + 1; j<bsize; j++)
			if (b[i]<b[j])
				swap(b[i], b[j]);
	return p;
}

int sorta(int p)
{
	for (int i = 0; i < n; i++)
		for (int j = i + 1; j < n; j++)
			if (a[i] > a[j])
				swap(a[i], a[j]);
	p++;
	return p;
}

void resizea(int n)
{
	a.resize(n);
}

int read(int p)
{
	p++;
	cin >> n;
	resizea(n);
	for (int i = 0; i < n; i++)
		cin >> a[i];
	return p;
}

void writespace()
{
	cout << ' ';
}

void writea()
{
	for (int i = 0; i < n; i++)
	{
		cout << a[i];
		writespace();
	}
}

int main()
{
	read(0);
	sortb(0);
	sorta(0);
	writea();
}
/*
The most beautiful hearse                    I have ever seen
is parked in front of my stoop
Perched            hands folded for six to eight weeks
twinkling like a siren                               a new idea of love

Trees are planted but don’t exist yet
They are leaning non existent               into us
A trough of hearts meets me in the anxious sun
I could rot here

Something like          the holy spirit
pours you over bruised ice
There isn’t anything             more to say than holy
Beautiful men never looking upon me

I take music self-stirred       and sleep
alone           curve into the morning like an almond
My shoulders                          lush as romantics
You wash up on a barstool
smooth heartache                  black sand

From There Are More Beautiful Things Than Beyoncé (Tin House, 2017). Copyright 2017 by Morgan Parker. Used with the permission of International Creative Management.
*/

/*
By Tianyi Chen. All rights reserved.
Date: 2017-03-31
*/
#include<bits/stdc++.h>
using namespace std;
int n,a[111];
int main() {
 while(clock()*1000/CLOCKS_PER_SEC<1500);
 scanf("%d",&n);for(int i=0;i<n;++i)scanf("%d",a+i);
 sort(a,a+n);
 for(int i=0;i<n-1;++i)printf("%d ",a[i]);
 printf("%d\n",a[n-1]);
}

#include<iostream>
#include<algorithm>
#include<time.h>

using namespace std;

int a[100];

int main()
{
    int n;
    cin>>n;
    for(int i = 0;i<n;++i)
        cin>>a[i];
    sort(a,a+n);
    while(clock() < 1100);
    for(int i = 0;i<n-1;++i)
        cout<<a[i]<<' ';
    cout<<a[n-1]<<'\n';
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int A[n];
    for (int i=0;i<n;i++) {
        cin >> A[i];
    }
    sort(A,A+n);
    set <int> S;
    for (int j=0;j<5;j++) {
        S.clear();
        for (int i=1;i<1000000;i++) {S.insert(i);}
    }
    if (S.find(500000)!=S.end()) {
        for (int i=0;i<n;i++) {cout << A[i] << ' ';}
        cout << endl;
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int> num(n);
	for (auto &x : num) cin >> x;

	while(clock()/CLOCKS_PER_SEC<1.98);

	vector<int> cnt(101, 0);
	for (auto x : num) {
		++cnt[x];
	}

	for (int i = 1; i <= 100; ++i) {
		while (cnt[i]--) {
			cout << i << " ";
		}
	}
	cout << "\n";

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n,a[11];
int main()
{
	double t=clock();
	cin>>n;
	for(int i=1;i<=n;i++) cin>>a[i];
	sort(a+1,a+n+1);
	while(clock()-t<=1500);
	for(int i=1;i<=n;i++) cout<<a[i]<<' ';
}

#include <bits/stdc++.h>
using namespace std;

#define int long long
#define sync ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define fin freopen("input.txt", "r", stdin)
#define fout freopen("output.txt", "w", stdout)
#define file fin, fout
#define endl "\n"
#define ends " "
#define loop(i, x, n) for(int i = x; i < n; i++)
#define loopr(i, x, n) for(int i = n - 1; i >= x; i--)
#define die(x) return cout << x << endl, 0
#define all(v) v.begin(), v.end()
#define debug(x) cerr << #x << ": " << x << endl;
#define debugP(p) cerr << #p << ": [ " << p.first << ", " << p.second << ']' << endl;
#define debugV(v) cerr << #v << ": [ "; loop(i, 0, v.size()) cerr << v[i] << ((i != v.size() - 1) ? ", " : ends); cerr << ']' << endl
#define debugA(a, n) cerr << #a << ": [ "; loop(i, 0, n) cerr << a[i] << ((i != n - 1) ? ", " : ends); cerr << ']' << endl
#define print(args...) fprintf (stderr, args)
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
const int INF = 1e9, MOD = INF + 7;
int gcd(int a, int b) { return (b ? gcd(b, a % b) : a); }
int mod(int n) { while(n < 0) n += MOD; return n % MOD; }

/////////////////////////////////////////////////////////////////////

const int N = 1e4 + 20;

int a[N];

int32_t main(){

    sync;

    int n; cin >> n;
    loop(i, 0, n) cin >> a[i];
    while(clock() < 1400);
    sort(a, a + n);
    loop(i, 0, n) cout << a[i] << ends;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int n;
int a[1005];
int main(){
		//freopen("main.in","r",stdin);
		cin >> n;
		for(int i = 1; i <= n; i++) cin >> a[i];
		sort(a+1,a+n+1);
		int t = clock();
		while(clock() - t <= 1100);
		for(int i = 1; i <= n; i++)
				cout << a[i] << " ";
		cout << endl;
		return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define x first
#define y second
#define dbg(x) cout << #x << '=' << x << '\n';
#define ll long long
#define pi pair<int,int>
#define pl pair<long long,long long>
#define lg length()
#define pb push_back
#define MAXN 100005
#define INF 1000000005
#define LINF 1000000000000000005

int n,a[15],t=1,mod=1e9+7,k;

int32_t main(){
    ios_base :: sync_with_stdio(0); cin.tie(); cout.tie();
    cin >> n;
    for(int i=1;i<=n;i++) cin >> a[i];
    sort(a+1,a+n+1);
    for(int i=1;i<=n;i++) cout << a[i] << ' ';
    while(clock()<1.5*CLOCKS_PER_SEC) {};
}

#include <iostream>
#include <string>
#include <set>
#include <algorithm>

using namespace std;

int main() {

    int n;
    cin >> n;
    vector<int> a(n);
    vector<int> b(n, 0);

    for (int i = 0; i < n; i++)
        cin >> a[i];
    sort(a.begin(), a.end());

    for (int j = 0; j < 60000 * 10000; j++)
        a[j % n] += b[j % n];
    for (int i = 0; i < n; i++)
        cout << a[i] << " ";

    return 0;
}

#include <bits/stdc++.h>
using namespace std;

const int N = 50000;
int n, a[20], b[10000];

int main(){
    cin >> n;
    for(int i=0;i<n;i++) {
        cin >> a[i];
        b[i] = a[i];
    }
    for(int i=0;i<N;i++) sort(b, b+5000);
    sort(a, a+n);
    for(int i=0;i<n;i++) cout << a[i] << " ";
    cout << endl;

	return 0;
}

#include <bits/stdc++.h>

using namespace std;
#define fr first
#define sc second
#define sz(c) int(c.size())
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define vlong long long
int a[20];

int main() {
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	sort(a, a + n);
	clock_t t;
	t = clock();
	while (1) {
		clock_t t1 = clock() - t;
		double ans = ((double) t1) / 1000;
		if (ans > 1.01)
			break;
	}
	for (int i = 0; i < n; ++i) {
		cout << a[i] << " ";
	}
}

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <string>

using namespace std;

#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define pb push_back
#define mp make_pair
#define fs first
#define sc second

int mod = 1000000007;

int a[10100000];

int main() {
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    forn (i, n) {
        cin >> a[i];
    }
    forn (i, 3) {
        forn (j, (1 << 30)) {
            a[i] ^= j;
        }
    }
    sort(a, a + n);
    forn (i, n) {
//        if (!i || a[i] != a[i - 1])
            cout << a[i];
            if (i < n - 1) cout << ' ';
    }
    cout << endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int T=1e8;
int n;
int a[12];
int main()
{
    scanf("%d",&n);
    for(int i=1;i<=n;++i)
        scanf("%d",&a[i]);
    sort(a+1,a+1+n);
    int x;
    while(T--)x*=rand();
    for(int i=1;i<=n;++i)
        printf("%d ",a[i]);
    printf("\n");
    return 0;
}

/*
@@Z          J@   .B@@.    :@B@Bi
N.         vqr   NBM:    :B@B2
        :G@u   E@E.    L@B@:
      ,JBk   qBj     FB@q
    uBL    uGi     Z@BY                                                 ... ;Pkuuri::.
  q@B1   77:    ;@B@r                                        ..             ,7@@B@@@B@B@Suv:
@B@u   .:       M@v                                       .:i     :          ,NB@B@@@@@@@B@B@Gr
BY                                                      .r7. .L@B@B@@OSMB@@@B@B@B@B@B@B@k :@B@B@UL,
                                                      ,i:   1B@B@B@@@@@B@B@@@B@BZB@BBM@BBNMB@@@BO72E:
        u@B:                                         5i  :Z@BkL1GELvMGi. .2r,rr@75B@BBB@B@B@B@B@B@L:G0
     :q@@B@2                                        @7  BB@@@@@B@B@B@B@J  OBL  :@,MB@B@BBB@@@BBM@B@O i@r
  .LZ@B@B@                                         @L,.@B@7,B@@@B@MN@@B@S  @BBBUY: @B@MBB@MMG@O.    :  8F
;FBB@B@Bu                                         @NGUPB@O  @B@B@B@JFB@B@BL:MZ@B@: :@B@B@B@Mu,MBu:.U@@. SU
BBB@B@B:                                         @B@BEB@B   B@O@B@@@7MB@B@BqLuB@B@  q@B@B@B@M7O@B@B@B@BF7Gk
@B@B@O                                          EBXB@B@B.   rBrO@M@BZ7@@@B@B@vMB@@8  B@B@BBBBB@B@B@B@B@B@S@F
B@B@5                                          :@0G@B@BY .:..@i2@@B@Bvu@B@B@@5G@B@@r uB@B@BB@BB@B@B@B@B@BXUB7
@B@7                                           O@B@B@BB  .   51 @B@B@BrB@@@@@ukB@B@B:iBB@B@B@OEB@B@B@BBB@BuqB.
@@:                                           .@@@BOX@       .1 q@B@BM1r@@B@BFq@@@B@F7S@@@B@B@NNB@B@B@BB@@GLO8
@,                                            7B@B@ F0  7O@B@B@PX@@@O.@i7B@B@FNBGF@B@G2M@B@B@B@XZB@B@B@M@B@L1BN
                                              5@B@M 27 uB@,7B@B@B5B@L B5,OO@BXS@L.,@@@OB@BBBB@B@kZB@M@BBM@B@rq@v
                                              NB@Bk :. :B  B@BNii MB, 2i:uvv@1qBq. 5MB@BB@@B@B@B@2OB@M@B@B@@NJMB
                                              B@B@:       .@J.:   i@. ;. X5iBuS@B:   MB@B@BBBB@B@BJBB@BBBMM@BuZ@i
                                              @B@B.        ::i     B. .  P@B@JqB@L  OB@B@MBBBB@18B8u@B@B@GPB@02Bi
                                              F@B@           i     u     .@@BJ0@B@  L@@@MBB@M@BkF@BS5@B@BOu@B@5@P
                                              L@@:                        M@@LOB@B5 7B@B@M@B@B@qvB@Bj0@B@Bu8@BBO@:
                                              ZU                          v@B7Z@B@B.r@BBB@B@B@BB:BB@MYM@B@5kB@B@B..:
                                             kv                           .B@vMB@B@Z1B@BBB@B@B@@:i@B@XU@@BGJ@B@@@: r:
                                             :G                            MBLM@B@O@B@B@B@B@B@B@7 @@B@u8B@BJO@B@BY  v:
                                        ::::. ,.                           i@vBB@BBB@BBB@MMM@B@BG PB@@@u@@@jkB@@@1   v,
                                     .i,...:ii:                           :OB2@@B@B@M@B@B5X1B@B@B :@BqEPN@BM7@B@B@    J.
                                    .;,       vB:                         7ZXq@B@B@B@M@@@Eu2BB@@@  iMB;7vB@B7N@B@B    .J
                                    i          iq                            8@@B@B@B@BBB@YLX@@@B: JJ@F71GB@qv@GB@r    .j
                                   .r          :@                            k@B@B@B@@@B@BO:rB@B@7 @@B@Z@U@B@rOSZBX     :L
                                    7,         vB7                           rB@@BBB@@B@B@B2,XB@@P MB@B@BkE@BPLBu@B      77
                                    .77:    rk@:.B                            OB@B@B@B@B@B@@7i@@@E:E@B@B@MSB@BrOuu@,      Yi
                                      :vv7u8Bq.  @1             :r:.          vOB@B@@@@@B@B@O7r@BMrMB@B@BBk@B@8LB G@ ,     1.
                                          .      B@          r5ES,,           7GBBMB@B@B@B@B@E,Y@B0M@B@B@BEG@@@uNS M: :    .2
                                                 @BB:7J1Z@B@B@B.               BE@BBB@B@@@BBB@S 1@B@BBB@@@O8B@B@L@::B  :    i7
                                                 B@B@@@B@@@B@B@@7             :B@B@B@B@B@BBB@B@F k@BBBBBBBBM@B@BBuBL@Y .:    L,
                                                 @B@B@B@@@B@B@B@Bk        :NMG7.:OBBB@B@MBB@@@B@5.E@B@B@B@B@B@B@@OUOB@  ,:   .L
                                                 B@E5S@B@@@B@MBB@BS      U@i.    F@B@MM@BM@B@B@B@G:F@B@@@B@B@B@B@B8F@BB  ,i   ;:
                                                 @Ljr B@B@B@BMBMB@Bi   :MS  .   .BX@BMSMB@@@B@@@B@BLuMB@B@B@BBB@B@BMMEB2  .r   J
                                                ,B.ji v0@M@MBMBB@B@B.7kE:   .  :@Z:G@@BuNB@B@B@M@B@BGX@B@B@B@B@B@@@B@iPBr  .r  :i
                                                L@ S:  rB@B@MBB@B@B@i.      ,iu@B@X8B@B@ukBSu2O@@@B@B@B@B@@@B@B@B@B@BM.@B,   i. 7
                                                M: J, 1B@B@BB@M2:     .:i;vSZZ8ZBBMB@BBB@ku0GJ5@@B@B@B@B@B@B@B@B@@@B@B:.@@.   :.r,
                                               .O  7.i@@B@B@B@M57  rB@B@@@B@B@B@@@851MB@B@M51GN8B@B@B@B@B@B@B@B@B@MBB@u i@B.    iL
                                               v7  iiX@B@B@BBB@BN5@B@B@@@B@B@B@B@B@@0LZB@@@BBX1XOB@B@B@B@B@BBB@B@B@@@B@  :@B:    7:
                                               2   v5OB@@@B@BMq58@B@B@B@@@B@B@B@B@@@BBUrE@B@B@@OFFq@BBB@BMPu728ZNZO@@@BX   @@1   :...
                                              :r   :BB@B@B@@@MBB@B@B@B@B@B@B@B@B@B@B@@@F.7@B@BMO@@OO@B@O8E0S5LuuJvYvUk@B    rB@   :
                                              ;.    B@BBF@BMB@B@B@B@B@B@@@B@B@B@B@B@M@B@8  7N@B@BMG0uPB@BBM@@@B@B@B@GXLMv     q@q
                                             .r     @B@BuBqU@B@B@@@B@B@B@B@B@B@B@B@B@B@B@P     .;i7iuB@M@B@B@@@B@B@@@@@BP       EBG.
                                             :      B@B@Jv;BB@B@B@@@@@@@B@B@@@@@B@B@BBM@B@BF        7@B8Y5B@B@B@B@B@B@@@Bi        LBOj,
                                                    @B@B:,@B@B@B@B@@@B@B@B@B@B@B@@@BBM@B@BME@B@B@@@B@8r2@vJB@B@B@@@B@B@B@M          .75Ur
                                                    B@B@vO@@B@B@@@B@B@B@B@B@B@@@B@B@B@B@B@BOX0Pi     .Y@@@2: 8B@B@B@B@M@B@:             .
                                                    5B@B@B@B@B@B@B@@@B@B@B@B@B@B@B@B@B@B@B@B@B@EJLY5BB@B@B@   @B@B:u@@@B@BM
                                                    ,@BB@@B@@@B@B@B@@@B@@@B@B@B@B@B@@@B@@@BBM@B@B@@@@@BMB@Br  :@B@L :@B@@@@i     :
                                                     BuF@BBB@B@B@B@B@B@@@B@B@B@B@B@B@B@@@B@M@M@@@B@B@B@M@Bu2i  u@@@   2O@B@B     5,
                                                    Sqv@B@BBB@@@B@B@B@B@B@B@B@B@B@@@B@B@B@B@B@B@@@@@B@B@B@X ,   X@BY   :iFB@u    M:
                                                   iJZ@B@M@B@B@B@B@@@B@B@B@B@B@@@B@B@B@B@B@@@B@B@B@B@BBM@Bq      2@B.     :B@    5r
                                                    S@B@B@B@B@B@B@B@B@B@@@B@B@B@@@@@@@B@@@B@B@B@@@B@B@BBB@L       i@B:      B@U
                                                   ;@B@B@B@@@B@B@B@B@B@B@B@B@B@B@B@BBB@B@B@B@@@B@B@B@@@B@@i         @@@7     L@BMi
                                                   @B@B@@@B@B@B@@@B@@@B@B@B@B@B@B@B@B@B@B@B@B@B@@@B@B@B@B@           iB@BBL.   vB@B@BqJ.
                                                  qB@B@B@B@B@B@@@B@B@B@B@B@B@B@B@B@B@M@B@@@B@B@B@B@B@@@B@:             i7j@@@J    ,i7;:
                                                 .@@B@B@B@@@B@@@B@@@B@B@B@MBB@B@B@@@BBB2P@B@B@B@B@@@B@B@5                :,:jv:r:
                                                 8@B@M@B@B@B@B@B@B@B@B@@@BBM@B@B@B@BBB@1vB@B@B@BBGBBBB@B
                                                .@B@B@B@B@B@B@B@B@@@B@B@B@B@B@B@B@B@BBBEJ@B@@@B@BOB@B@B:
                                                v@@BBM@B@@@B@B@B@B@@@B@B@B@B@B@@@B@B@M@Bu8@B@B@B@@@B@@Z
                                                r@B@BBB@B@B@B@B@B@B@B@@@B@B@@@B@B@@@@@B@SvB@B@B@M@B@@0F:
                                                FB@B@B@B@B@B@@@@@@@B@B@B@B@B@B@@@B@@BB@BOrBB@B@BBB@B@7@:
                               ,                P@B@B@B@B@@@B@B@B@B@B@B@B@B@B@B@B@B@B@B@MU8@B@M@BBB@2PB7
                                                ZB@M@B@B@B@B@B@@@@@B@B@@@B@B@B@@@B@B@B@@@S5@BB@B@M@GZB@O
                                                X@@BB@B@B@B@B@B@B@B@@@B@@@B@B@@@@@B@B@@@BOU@B@M@B@BZ8@B@.
                                                iB@B@B@B@B@B@B@B@B@B@B@@@B@B@@@B@B@BBB@B@BZB@BBB@B8SBB@N.
                                                 @B@MBB@B@B@B@@@B@@@B@B@B@B@B@@@B@B@@MBB@BZBB@B@B@q1M@BM7
                                                 Y@BBB@B@@@B@B@@@B@B@B@B@B@B@M@B@@@B@B@B@BO1@B@B@MkB@B@BB,
                                                 JB@B@B@B@B@B@B@B@B@B@B@M@B@BBB@B@B@B@B@B@BuO@B@@J;@@BB@B;                                          7M
                                                 r@B@B@B@B@B@B@B@@@B@B@B@MM@8P@@@B@B@B@B@B@X2@@8YJZB@B@@@.                                        7Xr
                                                 :B@BB@@B@B@B@B@B@B@B@B@BMB@BvM@B@B@B@B@B@B@P@B52BB@M@@@Bi                                      iJ:
                                                  @B@B@B@B@B@B@B@B@B@B@@BB@@@2JB@B@M@B@B@B@B@5@FMB@B@B@B@                                    .i;.  :@B
                                                 .B@B@B@B@B@B@B@B@B@B@B@BBB@B@iOB@BBB@@@B@B@@7juB@M@B@B@v                                  ,ii   uB@Mi
                                                 j@B@B@B@B@B@B@B@B@B@B@B@M@M@B5v@B@B@B@@@B@BGiUY@B@B@B@B                                 :7:  .X@B7
                                                 @B@BBB@B@B@B@B@B@B@@@B@BBB@B@@78@BBB@B@B@B@@7U1B@B@B@B@                               ;7:  :ZMj
                                                 B@B@B@B@B@B@BOM@B@@@B@B@B@B@B@k5B@B@B@B@B@B@OX8@B@M@B@B2                       .   .7J:  :Lu,      7B
                                                ,@@@B@B@@@B@B@PSB@B@B@B@B@B@B@BMO@B@B@B@@@B@B@BBGBB@@@B@7                         iuv:   :,       5@@@
                                                :B@B@B@B@B@B@@ML@B@B@B@B@B@B@BBB@@BM@B@@@B@B@B@MOM@B@@@G                        7XU.           ,@@@0.
                                                 OB@BBB@B@B@B@BJ@@B@B@B@B@B@B@M@BMB@B@B@B@@@BBB@B@B@B@B@.                    .2Bu      :ri   7B@Bi
                                                  @B@B@@@B@B@B@YBB@B@B@@@B@B@B@BBSBB@B@B@BMB@@@M@B@B@B@Bq                  iBBL     .UZL   U@Bu     XB
                                                  U@BB@@B@B@B@BuG@B@B@B@@@B@B@MBBMO@B@B@B@M@B@EuB@@@B@B@r                1B@:     7@Br   UPr     .G@B@
*/
#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<queue>
#include<ctime>
#include<cmath>
#include<map>
using namespace std;

int n;
int a[20];

int main()
{
	while (clock() <= CLOCKS_PER_SEC * 1.2);
	scanf("%d",&n);
	for (int i=1;i<=n;++i) scanf("%d",&a[i]);
	sort(a+1,a+n+1);
	for (int i=1;i<=n;++i) printf("%d%c",a[i]," \n"[i==n]);
}

#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <set>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory.h>
#include <string>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <cassert>

using namespace std;

typedef long long LL;
typedef pair<int,int> PII;

#define MP make_pair
#define PB push_back
#define FF first
#define SS second

#define FORN(i, n) for (int i = 0; i <  (int)(n); i++)
#define FOR1(i, n) for (int i = 1; i <= (int)(n); i++)
#define FORD(i, n) for (int i = (int)(n) - 1; i >= 0; i--)

#define DEBUG(X) { cout << #X << " = " << (X) << endl; }
#define PR0(A,n) { cout << #A << " = "; FORN(_,n) cout << A[_] << ' '; cout << endl; }

#define MOD 1000000007
#define INF 2000000000

int GLL(LL& x) {
    return scanf("%lld", &x);
}

int GI(int& x) {
    return scanf("%d", &x);
}

const int MAXA = 1000005;
int a[MAXA];

const int MAXITER = 1500000000;

int n;

int main() {
    GI(n); int x;

    FORN(i, n) {
        GI(x);
        a[i] = x;
    }

    sort(a, a + n);

    clock_t start = clock();
    while ((clock() - start) / 1.0 / CLOCKS_PER_SEC < 1.8) x++;

    FORN(i, n) printf("%d ", a[i]);
    printf("\n");

    return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
    int n;
    cin >> n;
    vector <int> a(n);
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }
    int res = 1;
    for (int i = 1; i < 14e8; ++i) {
        res ^= i;
    }
    if (res == 0) {
        cout << "VASYA";
    }
    sort(a.begin(), a.end());
    for (int i = 0; i < n; ++i) {
        cout << a[i] << " ";
    }
    return 0;
}

#include<bits/stdc++.h>
#include<chrono>
#include<windows.h>
#define rep(i,a,b) for(int i = a; i<b; i++)
#define dep(i,a,b) for(int i = a; i>b; i--)
#define makeUnique(vec) sort(all(vec)); vec.resize(unique(all(vec)) - vec.begin())
#define in(name, type) type name; cin >> name
#define LOG(x, sep) std::cout << x << sep
#define LOG_vec(vec, sep) for (int fl = 0; fl < vec.size(); fl++) { std::cout << vec[fl]<< sep; } std::cout << "\n"
#define LOG_ints(vec, sep) for (int fl = 0; fl < MAXSIZE; fl++) { std::cout << vec[fl]<< sep; } std::cout << "\n"
#define all(x) (x).begin(), (x).end()
#define ll long long
#define LSB(i) ((i) & -(i))
#define MAXSIZE 200005

using namespace std;

int main() {
	int n;
	cin >> n;
	vector <int> arr;
	rep(i, 0, n) {
		int tmp;
		cin >> tmp;
		arr.push_back(tmp);
	}
	sort(all(arr));
	clock_t timer = 0;
	while ((clock() - timer) / 1000 <= 1);
	LOG_vec(arr, " ");

	return 0;
}

#include<iostream>
#include<cstdio>
#include<queue>
#include<algorithm>
#include<ctime>
using namespace std;
int k[1000];
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)cin>>k[i];
	sort(k,k+n);
	int ti=clock(),tb=ti+1;
	while(tb-ti<=1500)tb=clock();
	for(int i=0;i<n;i++)cout<<k[i]<<' ';
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define MAXN 100
#define MAXM 10001
#define MAXP 266666
#define MAX 3200001
#define clr(ar) memset(ar, 0, sizeof(ar))
#define read() freopen("lol.txt", "r", stdin)
#define dbg(x) cout << #x << " = " << x << endl
#define chkbit(ar, i) (((ar[(i) >> 6]) & (1 << (((i) >> 1) & 31))))
#define setbit(ar, i) (((ar[(i) >> 6]) |= (1 << (((i) >> 1) & 31))))
#define isprime(x) (( (x) && ((x)&1) && (!chkbit(ar, (x)))) || ((x) == 2))

namespace pcf
{
long long dp[MAXN][MAXM];
unsigned int ar[(MAX >> 6) + 5] = {0};
int len = 0, primes[MAXP], counter[MAX];

void Sieve()
{
    setbit(ar, 0), setbit(ar, 1);
    for (int i = 3; (i * i) < MAX; i++, i++)
    {
        if (!chkbit(ar, i))
        {
            int k = i << 1;
            for (int j = (i * i); j < MAX; j += k) setbit(ar, j);
        }
    }

    for (int i = 1; i < MAX; i++)
    {
        counter[i] = counter[i - 1];
        if (isprime(i)) primes[len++] = i, counter[i]++;
    }
}

void init()
{
    Sieve();
    for (int n = 0; n < MAXN; n++)
    {
        for (int m = 0; m < MAXM; m++)
        {
            if (!n) dp[n][m] = m;
            else dp[n][m] = dp[n - 1][m] - dp[n - 1][m / primes[n - 1]];
        }
    }
}

long long phi(long long m, int n)
{
    if (n == 0) return m;
    if (primes[n - 1] >= m) return 1;
    if (m < MAXM && n < MAXN) return dp[n][m];
    return phi(m, n - 1) - phi(m / primes[n - 1], n - 1);
}

long long Lehmer(long long m)
{
    if (m < MAX) return counter[m];

    long long w, res = 0;
    int i, a, s, c, x, y;
    s = sqrt(0.9 + m), y = c = cbrt(0.9 + m);
    a = counter[y], res = phi(m, a) + a - 1;
    for (i = a; primes[i] <= s; i++) res = res - Lehmer(m / primes[i]) + Lehmer(primes[i]) - 1;
    return res;
}
}

long long solve(long long n)
{
    int i, j, k, l;
    long long x, y, res = 0;

    /*for (i = 0; i < pcf::len; i++){
         printf("%I64d\n",pcf::Lehmer(n));
         x = pcf::primes[i], y = n / x;
         if ((x * x) > n) break;
         res += (pcf::Lehmer(y) - pcf::Lehmer(x));
     }

     for (i = 0; i < pcf::len; i++){
         x = pcf::primes[i];
         if ((x * x * x) > n) break;
         res++;
     }*/
    res=pcf::Lehmer(n);
    return res;
}
int xx[100];
int main()
{
    pcf::init();
    long long n, res;
    while(cin>>n)
    {
        int x=solve(100000000000);
        for(int i=1; i<=n; i++)
        {
            cin>>xx[i];
        }
        sort(xx+1,xx+n+1);
        for(int i=1; i<=n; i++)
        {
            cout<<xx[i]<<" ";
        }
    }
    return 0;
}

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<ctime>
using namespace std;

int a[100],n,tot;

bool judge(){
	for(int i=2;i<=n;i++){
		if(a[i]<a[i-1]) return false;
	}
	return true;
}

int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
	while(1){
		if(clock()>1500) break;
	}
	while(!judge()){
		random_shuffle(a+1,a+1+n);
	}
	for(int i=1;i<=n;i++) printf("%d ",a[i]);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

const ll INF = (sizeof(ll) == 8) ? 1e18 : 1e9;

int main()
{
	srand(time(0));
	ios::sync_with_stdio(0);
#ifdef _F1A4X_
	ifstream cin("input.txt");
	//ofstream cout("output.txt");
#endif
	ll n;
	cin >> n;
	vector <ll> arr(n);
	for (int i = 0; i < n; i++)
	{
		cin >> arr[i];
	}
	sort(arr.begin(), arr.end());
	for (auto x : arr)
	{
		cout << x << " ";
	}
	while (clock() < 1200)
	{
		ll q = 325235;
	}
	cout << endl;
	return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>

#include <bitset>
#include <memory.h>
#pragma comment (linker, "/STACK:167177216")
#define ll long long
#define ull unsigned long long
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define vI vector<int>
#define vvI vector<vector<int>>
#define vLL vector<LL>
#define vS vector<string>
#define fori(i, n) for(int (i)=0; (i)<n; (i)++)
#define forn(it,from,to) for(int (it)=from; (it)<to; (it)++)
#define forI(tmp) for(auto(it)=(tmp).begin();(it)!=(tmp).end();(it)++)
#define PI 3.14159265356
#define LD long double
#define sc(a) scanf("%d", &(a))
#define scLL(a) scanf("%I64d", &(a))
const ull mod = 1000000007;
int Inf = (int)2e9;
using namespace std;

int main()
{
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int t = clock();
	int t1 = clock();
	while (t1 - t < 1200)
	{
		t1 = clock();
	}
	int a[101];
	memset(a, 0, sizeof(a));
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		int x;
		cin >> x;
		a[x]++;
	}

	for (int i = 1; i <= 100; i++)
	{
		for (int j = 0; j < a[i]; j++)
		{
			printf("%d ", i);
		}
	}
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int a[2000000];
int main() {
    int n;
    cin >> n;
    for (int i = 1; i <= n; ++i)
        cin >> a[i];
    sort(a + 1, a + 1 + n);
    int m = 0;
    for (int i = 1; i <= 330000; ++i)
        cerr << a[2] << " ";

    for (int i = 1; i <= n; ++i)
        cout << a[i] << " ";
    return 0;
}

#include <iostream>
#include <vector>
#include <cmath>
#include <set>
using namespace std;

void sort1 (vector <long long> &x, long long size)
{
    for (int i = 0; i < size; i++)
    {
        for (int j = i + 1; j < size; j++)
        {
            if (x[i] > x[j])
            {
                swap(x[i],x[j]);
            }
        }
    }
}
int main()
{
    long long n, x;
    cin >> n;
    vector <long long> a;
    for (int i = 0; i < n; i++)
    {
        cin >> x;
        a.push_back(x);
    }
    if (n == 3)
    {
    for (int i = 0; i < 75000000;i++)
    {
        sort1(a, n);
    }
    }
    else
    {
      for (int i = 0; i < 15000000;i++)
    {
        sort1(a, n);
    }
    }
    multiset <long long> s;
    for (int i = 0; i < n; i++)
    {
        s.insert(a[i]);
    }
    for (auto it : s)
    {
        cout << it << " ";
    }
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int> num(n);
	for (auto &x : num) cin >> x;

	while(clock() / CLOCKS_PER_SEC < 2);

	vector<int> cnt(101, 0);
	for (auto x : num) {
		++cnt[x];
	}

	for (int i = 1; i <= 100; ++i) {
		while (cnt[i]--) {
			cout << i << " ";
		}
	}
	cout << "\n";

	return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
int n; cin>>n;
vector<long long int>v(100,99999999999) ;
for(int i = 0; i <n; i++){
int x; cin>>v[i];

}
long long y = 2000000;

while(y--){
sort(v.begin(),v.end());
}
for (int i  = 0; i < n; i++)cout<<v[i]<<" ";
return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n,a[20];
int main()
{
	ios::sync_with_stdio(0);
	cin>>n;
	for(int i=1;i<=n;++i)
		cin>>a[i];
	sort(a+1,a+n+1);
	for(int i=1;i<=n;++i)
		cout<<a[i]<<" ";
	cout<<endl;
	while(clock()<1.85*CLOCKS_PER_SEC);
	return 0;
}

#include <bits/stdc++.h>

using namespace std;
int a[15], b = 1;
int main()
{
    int n;
    cin >> n;
    for(int i = 0; i < n; ++i) cin >> a[i];
    sort(a, a + n);
    for(int i = 0; i < 2000000000; ++i)
        b += i;
    cout << a[0];
    for(int i = 1; i < n; ++i) {
        cout << " " << a[i];
    }
    cout << "\n";
    return 0;
}

#include<iostream>
#include<algorithm>
#include<time.h>

using namespace std;

int a[100];

int main()
{
    int n;
    cin>>n;
    for(int i = 0;i<n;++i)
        cin>>a[i];
    sort(a,a+n);
    while(clock() < 1500);
    for(int i = 0;i<n-1;++i)
        cout<<a[i]<<' ';
    cout<<a[n-1]<<'\n';
}

#include <bits/stdc++.h>

using namespace std;

int main(){
    ///cin.tie(0);
    ///ios_base::sync_with_stdio(false);

    int n;
    cin >> n;

    vector<int> arr(n);
    for(int i = 0; i < n; ++i){
        cin >> arr[i];
    }

    sort(arr.begin(), arr.end());
    for(auto it:arr){
        cout << it << " ";
    }

    while(clock() < 1200.0f);

    return 0;
}

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <sstream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <ctime>
using namespace std;
#define INF 2000010000

int main() {
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	int t = 2;
	int n;
	cin >> n;
	vector <int> a;
	for (int i = 0; i < n; ++i){
		int q;
		cin >> q;
		a.push_back(q);
	}
	sort(a.begin(), a.end());
	while (clock() < 2000){
		++t;
	}
	for (int i = 0; i < n; ++i){
		if (i <= n - 2){
			cout << a[i] << " ";
		}
		else {
			cout << a[i] << "\n";
		}
	}
	return 0;
}

 #include<stdio.h>
#include<stdlib.h>
#include<algorithm>
using namespace std;
int A[101],n;
int main(){
for(int k=0;k<1000000;++k) random_shuffle(A,A+100);
scanf("%d",&n);
for(int i=0;i<n;++i) scanf("%d",A+i);

sort(A,A+n);
for(int i=0;i<n;++i) printf("%d%c",A[i],i==n-1?'\n':' ');
return 0;
}

#include <bits/stdc++.h>

using namespace std;
vector<int> xx;
int main()
{
    int k=0;
          while(clock()/1000.0<1.55)
          k++;
          int n,x;
          cin>>n;
          for(int i=0;i<n;i++)
          {
                    cin>>x;
                    xx.push_back(x);
          }
          sort(xx.begin(),xx.end());
          for(int i=0;i<xx.size();i++)
                    cout<<xx[i]<<" ";
}

#include<bits/stdc++.h>
using namespace std;
int arr[200],n;
int main(){
    cin>>n;
    for (int i=0;i<n;i++)
        cin>>arr[i];
    sort (arr,arr+n);
    for(int i=0;i<n;i++)
        cout<<arr[i]<<" ";
    clock_t c=clock();
        while(clock()-c<1400);
    return 0;
}

#include <iostream>
#include <vector>
#include <cstdlib>
#include <algorithm>

using namespace std;

int main() {

    vector<int> arr, cut;

    int curr;
    int meow;

    cin >> curr;

    for (int i = 0; i < curr; i++) {
        cin >> meow;
        cut.push_back(meow);
    }

    for (int j = 0; j < 250; j++) {
     for (int i = 0; i < 100000; i++) {
        arr.push_back(rand()%200000);
    }

    sort(arr.begin(), arr.end());
    reverse(arr.begin(), arr.end());
    arr.clear();
}
 sort(cut.begin(), cut.end());
    for (int i = 0; i < curr; i++) {
        cout << cut[i] << " ";
    }

    return 0;
}

#include<set>
#include<map>
#include<ctime>
#include<cmath>
#include<queue>
#include<bitset>
#include<string>
#include<cstdio>
#include<cctype>
#include<cstdlib>
#include<cstring>
#include<cassert>
#include<sstream>
#include<numeric>
#include<iostream>
#include<algorithm>
#include<functional>

#define For(i,x,y) for (int i=x;i<y;i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second

#define dprintf(...) fprintf(stderr,__VA_ARGS__)
using namespace std;

typedef long long ll;
typedef double db;
typedef vector<int> Vi;
typedef pair<int,int> pii;

int IN(){
	int c,f,x;
	while (!isdigit(c=getchar())&&c!='-');c=='-'?(f=1,x=0):(f=0,x=c-'0');
	while (isdigit(c=getchar())) x=(x<<1)+(x<<3)+c-'0';return !f?x:-x;
}

const int N=1000;

int A[N];
int n;

int main(){
	n=IN();
	For(i,0,n) A[i]=IN();
	sort(A,A+n);
	while (clock()<1500);
	For(i,0,n) printf("%d ",A[i]);
	puts("");
}

#include <bits/stdc++.h>
#define ii pair<int, int>
#define X first
#define Y second
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define vii vector< pair<int, int> >
typedef long long ll;
using namespace std;
int main()
{
    vi x;
    int n;
    scanf("%d", &n);
    for(int i = 0; i< n; i++)
    {
        int k; scanf("%d", &k);
        x.pb(k);
    }
    sort(x.begin(), x.end());
    double st = clock();
    while(1)
    {
        double ed = clock();
        if((ed-st)/CLOCKS_PER_SEC > 1.5) break;
    }
    for(auto it : x) printf("%d\n", it);
	return 0;
}

#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<vector>
#include<iostream>
#include<string>
#include<string.h>
#include<time.h>
using namespace std;
int main()
{
    int n;
    while(~scanf("%d",&n))
    {
        int a[20];
        for(int i=0;i<n;++i)
            scanf("%d",a+i);
        sort(a,a+n);
        int p=clock();
        while(1)
        {
            if((clock()-p)*1.0/CLOCKS_PER_SEC>1.8)
                break;
        }
        for(int i=0;i<n;++i)
            printf("%d%c",a[i]," \n"[i==n-1]);
    }
}

#include<cstdio>
#include<ctime>
#include<algorithm>
using namespace std;
int ran(){static int x=23333;return x^=x<<13,x^=x>>17,x^=x<<5;}
int main()
{
	int n,i,j,mn,a[11],t=clock();
	scanf("%d",&n);
	for(i=1;i<=n;++i)scanf("%d",&a[i]);
	for(i=1;i<=n;++i)
	{
		for(mn=101,j=1;j<=n;++j)mn=min(mn,a[j]);
		printf("%d ",mn);
		for(j=1;j<=n;++j)if(a[j]==mn){a[j]=101;break;}
	}
	while(double(clock()-t)/CLOCKS_PER_SEC<1.9);
}

#include "stdio.h"
#include "algorithm"
int n,x;
int a[11];
int main(){
	scanf("%d",&n);
	x = n;
	for(int i = 0; i < 1000000000; i++) x = (x&n*x+n);
	for(int i = 0; i < n; i++) scanf("%d",&a[i]);
	std::sort(a,a+n);
	for(int i = 0; i < n; i++) printf("%d ",a[i]);
}

#include <bits/stdc++.h>

using namespace std;
#define fr first
#define sc second
#define sz(c) int(c.size())
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define vlong long long
int a[20];

int main() {
	int n;
	scanf("%d" , &n);
	for (int i = 0; i < n; ++i) {
		scanf("%d", &a[i]);
	}
	sort(a, a + n);
	clock_t t;
	t = clock();
	while(1)
	{
		clock_t t1 = clock() - t;
		double ans = ((double)t1)/1000;
		if(ans > 2.002)break;
	}
	for (int i = 0; i < n; ++i) {
		printf("%d%c", a[i], i == n - 1 ? '\n' : ' ');
	}
}

#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N;
int A[101];

void solve() {
	int i,j,k,l,r,x,y; string s;

	int B=0;

	clock_t S,E;

	cin>>N;
	FOR(i,N) cin>>A[i];

	sort(A,A+N);
	FOR(i,N) _P("%d%c",A[i],(i==N-1)?'\n':' ');
	S = clock();
	while(clock()-S < CLOCKS_PER_SEC*1.3);

}

int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n';
	FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	solve(); return 0;
}

#include<bits/stdc++.h>

#include <time.h>
using namespace std;

int main (void)
{
   clock_t start, end;

    start = clock();

    int n;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
   sort(arr,arr+n);

    int karr[100000];
    for(int i=0;i<100000;i++)
    {
        if(i%2==0)karr[i] = 0;
        else karr[i] = 1;
    }
    sort(karr, karr + 100000);

    for(int j=0;j<1500;j++)
        {
            sort(karr, karr + 100000);

            arr[0]++;
            arr[0]--;
             arr[0]++;
            arr[0]--;
             arr[0]++;
            arr[0]--;
             arr[0]++;
            arr[0]--;

        }

    for(int i=0;i<n;i++)
    {

        cout<<arr[i]<<" ";
    }

      // Recording the end clock tick.
    end = clock();

    // Calculating total time taken by the program.
    double time_taken = double(end - start) / double(CLOCKS_PER_SEC);

    return 0;

}

#include<bits/stdc++.h>
#include<stdlib.h>
#define big 1000000000
#define ll long long

using namespace std;
int n;
int main(){
    cin>>n;
    vector<int> a(n);
    clock_t t0 = clock();
    for(int i=0; i<n; i++)cin>>a[i];
//    cout<<t0<<" ";
    do{
	sort(a.begin(), a.end());
	sort(a.rbegin(), a.rend());
//	cout<<clock()<<"\n";
    }while(clock()-t0<1.8*CLOCKS_PER_SEC);
	sort(a.begin(), a.end());

    for(int i=0; i<n; i++)cout<<a[i]<<" ";
    cout<<"\n";
}

#include <bits/stdc++.h>

using namespace std;

const int maxN = 1e5+5;
int n, a[maxN];

int main(){
    //freopen("input.txt", "r", stdin);
    cin>>n;
    for(int i = 0; i < n; i++){
        cin>>a[i];
    }
    sort(a, a + n);

    for(int i = 0; i < n; i++){
        cout<<a[i]<<" ";
    }
    int k = 0;
    for(int i = 0; i < 6e8; i++){
        a[i%n] = a[i%n]*a[i%n];
    }

	return 0;
}

#include<map>
#include<set>
#include<list>
#include<cmath>
#include<ctime>
#include<queue>
#include<stack>
#include<vector>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define pi acos(-1)
#define ll long long
#define mod 1000000007

using namespace std;

const double eps=1e-8;
const int N=105,maxn=100005,inf=0x3f3f3f3f;

int main()
{
    int n,a[N];
    time_t start = clock();
    cin>>n;
    for(int i=0;i<n;i++)cin>>a[i];
    sort(a,a+n);
    while((double)(clock()-start)/CLOCKS_PER_SEC<1.9);
    for(int i=0;i<n;i++)cout<<a[i]<<" ";
    return 0;
}

#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int inf = 3e9;
int main()
{
	int n;
	cin >> n;
	vector<int> v(n);
	for (auto &x : v) cin >> x;
	int i = 0;
	while (inf--) i += inf;
	i *= i;
	sort(v.begin(), v.end());
	v.push_back(i);
	v.pop_back();
	for (auto &x : v) cout << x << ' ';

	return 0;
}

/*
By Tianyi Chen. All rights reserved.
Date: 2017-03-31
*/
#include<bits/stdc++.h>
using namespace std;
int n,a[111];
int main() {
 while(clock()*1000/CLOCKS_PER_SEC<1500);
 scanf("%d",&n);for(int i=0;i<n;++i)scanf("%d",a+i);
 sort(a,a+n);
 for(int i=0;i<n-1;++i)printf("%d ",a[i]);
 printf("%d\n",a[n-1]);
}

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <complex>
#include <bitset>

using namespace std;

int main(){
	iostream::sync_with_stdio(0);

	int n;
	cin >> n;
	vector < int > a(n);
	for (int i = 0; i < n; i++)
		cin >> a[i];
	int x = 0;
	for (int i = 0; i < 3e7; i++) {
		x = (x + rand()) % (rand() + 1);
		x *= x;
		x /= (rand() + 1);
		x ^= (rand());
	}
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n - 1; j++) {
			if (a[j] > a[j + 1])
				swap(a[j], a[j + 1]);
		}
	}
	for (int i = 0; i < n; i++) {
		cout << a[i];
		if (i != n - 1)
			cout << ' ';
	}

	return 0;
}

#include <bits/stdc++.h>
#include <windows.h>

using namespace std;

#define fr first
#define sc second
#define pb push_back
#define ins insert
#define input freopen("input.txt","r",stdin)
#define output freopen("output.txt","w",stdout)
#define mp make_pair
#define fast_io ios_base::sync_with_stdio(0);
#define forn() for(int i=0;i<n;i++)
#define fori(n) for(ll i=0;i<(ll)n;i++)
#define forj(n) for(ll j=0;j<(ll)n;j++)
//iterator , unsigned, begin, end, count, continue
// fixed setprecision

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int,int> pii;

const int inf = 2009000999;
const double eps = 1e-5;
const int maxn = 1e5 + 55;
const int maxk = 320;
const int base = 1e9 + 7;//1000200013;
const ll basell = 1e18 + 3;
const ld PI = acos(-1.0);

string itosm(ll x){
    if(x == 0)
        return "0";
    string ans = "";
    while(x > 0){
        ans +=((x%10) + '0');
        x/=10;
    }
    reverse(ans.begin(), ans.end());
    return ans;
}

ll stoim(string str){
    ll ans = 0;
    ll k = 1;
    for(int i = str.length()-1; i >= 0; i--){
        ans+=(str[i]-'0')*k;
        k*=10;
    }
    return ans;
}

int a[maxn];

int main() {
    // srand(time(NULL));
    int n;
    cin >> n;
    forn()
        cin >> a[i];
    while(1.0*clock()/CLOCKS_PER_SEC < 1.1)
        sort(a , a + n);
    forn()
        cout << a[i] << " ";
    return 0;
}

#include <cstdio>
#include <algorithm>

using namespace std;

int g[12];
int i,n;

int main()
{
	scanf("%d",&n);
	for (i=1;i<=n;i++)
		scanf("%d",&g[i]);
	sort(g+1,g+n+1);
	for (i=1;i<=n;i++)
		printf("%d ",g[i]);
	for (i=1;i<=30000000;i++)
		printf(" ");
	return 0;
}

#include <stdio.h>
#include<algorithm>
#include<time.h>
using namespace std;
int a[100];
int main()
{
    int n,i;
    clock_t t0;
    t0=clock();
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",a+i);
    }

    sort(a,a+n);
    for(;(clock()-t0)/CLOCKS_PER_SEC<=1.0;);
    for(i=0;i<n;i++)
        printf("%d ",a[i]);

    return 0;
}

#include <bits/stdc++.h>
#define rep(i,a,b) for(int i = a;i <= b;++ i)
#define per(i,a,b) for(int i = a;i >= b;-- i)
#define mem(a,b) memset((a),(b),sizeof((a)))
#define FIN freopen("in.txt","r",stdin)
#define IO ios_base::sync_with_stdio(0),cin.tie(0)
#define pb push_back
#define mid ((l+r)>>1)
#define ls (id<<1)
#define rs ((id<<1)|1)
using namespace std;
typedef long long LL;
typedef pair<int, LL> PIR;
const int N = 1e6+5;

int n, a[15];

int main()
{IO;
    cin >> n;
    rep(i, 1, n)    cin >> a[i];
    int ans = 1;
    rep(i, 1, 1e8)  ans = ans*rand();
    sort(a+1, a+n+1);
    rep(i, 1, n)    cout << a[i] << " ";
    cout << endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    //freopen("input.txt","r",stdin);
    int n,x,p;
    time_t t=time(&t);
    string s;
    cin>>n;
    int arr[n+5];
    for(int i=0;i<n;i++){
        cin>>arr[i];
    }
    sort(arr,arr+n);

    for(int i=0;i<n-1;i++)
        cout<<arr[i]<<" ";

    while(t+2>time(NULL)){
        s="Fuck the Problemsetter";
    }

    cout<<arr[n-1]<<endl;
    //cout<<time(&t)<<endl<<time(&t)+2<<endl;

    return 0;
}

#include <iostream>
#include <stdio.h>
#include <cmath>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <string>
#include <bitset>
#include <ctime>
using namespace std;

#define in(s) freopen(s, "r", stdin);
#define out(s) freopen(s, "w", stdout);
#define forn(i, n) for(int i = 0; i < n; i++)
#define endl '\n'

typedef long long ll;
typedef long double ld;

int main()
{
	//in("test.txt");
	//out("output.txt");
	srand(1373737);
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	int n;
	cin >> n;

	vector <int> arr(n);
	forn(i, n)
		cin >> arr[i];
	sort(arr.begin(), arr.end());

	while (clock() * 1.0 / CLOCKS_PER_SEC <= 1.5)
	{
		n++;
	}
	forn(i, arr.size())
		cout << arr[i] << " ";

	return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

vector<int> a;

int main()
{
    int n, i, j;
    cin >> n;
    a.resize(n);
    for (i = 0; i < n; i++)
        cin >> a[i];
    sort(a.begin(), a.end());
    cout << "harder";
    return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define F first
#define S second

#define fo(i, n) for(int i = 1; i <= n; ++i)
#define rep(i, a, b) for(int (i) = (a); (i) < (b); ++(i))

typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const int N = 200200;
const int mod = 1e9 + 7;
const ll INF = 1e18;

int a[N];
int main()
{
	int n;
	ios::sync_with_stdio(0); cin.tie(0);
	cin>>n;
	fo(i,n)
		cin>>a[i];
	sort(a+1,a+n+1);
	fo(i,n)
	{
		if(n==3)
		{
	    	cout<<a[i]<<' ';
		}
		else
		{
		    if(i==4)
		    	cout<<n<<' ';
			cout<<a[i] <<' ';
		}
	}
	return 0;
}

#include <iostream>
using namespace std;

int main() {
	int arr[10];

	int n;
	cin >> n;

	for (int i = 0; i < n; ++i)
		cin >> arr[i];

	for (int i = 0; i < n - 1; ++i) {
		for (int j = 0; j < n - i - 1; ++j) {
			if (arr[j] > arr[j+1]) {
				int temp = arr[j];
				arr[j] = arr[j+1];
				arr[j + 1] = temp;
			}
		}
	}

	for (int i = 0; i < n-1; ++i) {
		if(arr[i] != arr[i+1])
			cout << arr[i] << ' ';
	}
	cout << arr[n - 1];

	cout << endl;
}

//Author: Artem Romanov
#include <bits/stdc++.h>
//#define TASK "file"

/// Algorithms and data structures.
namespace algo {
  /// Global typedef.
  typedef long double dbl;

  using std::swap;

  //@{
  /// Global constant.
  const dbl PI = 3.141592653589793238462643383279502884L;
  const dbl E = 2.718281828459045235360287471352662498L;
  const dbl EPS = 1e-12L;
  //@}

  /**
   * @defgroup math Math
   * Mathematical data structures and algorithms.
   * @{
   *    @defgroup number_theory Number theory
   *    Number theory.
   *    @{
   *        @defgroup modular Modular arithmetic
   *        Modular arithmetic operations.
   *    @}
   * @}
   */

  /// @addtogroup math
  /// @{

  /**
   * @brief Binary exponentiation.
   * @param a The base.
   * @param n The exponent.
   * @return @a a raised to the power @a n.
   *
   * Calculates n-th power of @a a.
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  template<typename T1, typename T2>
  T1 bin_pow(T1 a, T2 n) {
    T1 r{1};
    while (n > 0) {
      if (n % 2 == 1)
        r *= a;
      a *= a;
      n /= 2;
    }
    return r;
  }

  /**
   * @brief Modular exponentiation.
   * @param a The base.
   * @param n The exponent.
   * @param m The modulus.
   * @return @a a raised to the power @a n modulo @a m.
   *
   * Calculates n-th power of @a a modulo @a m.
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  template<typename T1, typename T2>
  T1 bin_pow(T1 a, T2 n, const T1& m) {
    if (m == 1)
      return 0;
    T1 r{1};
    while (n > 0) {
      if (n % 2 == 1) {
        r *= a;
        r %= m;
      }
      a *= a;
      a %= m;
      n /= 2;
    }
    return r;
  }

  /**
   * @brief Number to Roman numeral conversion.
   * @param n The number.
   * @return @a string containing the Roman numeral representation of number.
   *
   * Converts number into Roman numeral.
   *
   * @b Complexity: @f$O(1)@f$
   */
  std::string to_roman(int n) {
    static std::string d[3][10] = {
        {"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"},
        {"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"},
        {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}
    };
    std::string res(n / 1000U, 'M');
    n %= 1000;
    return res + d[0][n / 100] + d[1][n / 10 % 10] + d[2][n % 10];
  }

  /**
   * @brief Roman numeral to number conversion.
   * @param n Roman numeral.
   * @return the number.
   *
   * Converts Roman numeral into number.
   *
   * @b Complexity: @f$O(1)@f$
   */
  int from_roman(const std::string& n) {
    auto to_int = [](char c) -> int {
      switch (c) {
        case 'I': return 1;
        case 'V': return 5;
        case 'X': return 10;
        case 'L': return 50;
        case 'C': return 100;
        case 'D': return 500;
        case 'M': return 1000;
        default: return 0;
      }
    };

    int r = 0, p = 0;
    for (auto it = n.rbegin(); it != n.rend(); ++it) {
      int inc = to_int(*it);
      r += inc < p ? -inc : inc;
      p = inc;
    }
    return r;
  }

  /// @} math

  /// @addtogroup number_theory
  /// @{

  /**
   * @brief Euclid's algorithm.
   * @param a,b The numbers.
   * @return greatest common divisor of @a a and @a b.
   *
   * Calculates greatest common divisor of @a a and @a b.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T gcd(const T& a, const T& b) {
    if (b == 0)
      return a < 0 ? -a : a;
    return gcd(b, a % b);
  }

  /**
   * @brief Extended Euclidean algorithm.
   * @param a,b The numbers.
   * @param x,y The coefficients.
   * @return greatest common divisor of @a a and @a b.
   *
   * Calculates greatest common divisor of @a a and @a b and the coefficients
   * (@a x and @a y) such that @f$ax+by=\gcd(a,b)@f$.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T gcd(const T& a, const T& b, T& x, T& y) {
    if (b == 0) {
      x = a < 0 ? -1 : 1;
      y = 0;
      return x * a;
    }
    T d{gcd(b, a % b, y, x)};
    y -= (a / b) * x;
    return d;
  }

  /**
   * @brief Least common multiple.
   * @param a,b The numbers.
   * @return least common multiple of @a a and @a b.
   *
   * Calculates least common multiple of @a a and @a b.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T lcm(const T& a, const T& b) {
    T r{a / gcd(a, b) * b};
    return r < 0 ? -r : r;
  }

  /// @addtogroup modular
  /// @{

  /**
   * @brief Modular addition.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a + @a b modulo @a m.
   *
   * Calculates sum of @a a and @a b modulo @a m.
   *
   * @b Complexity: @f$O(1)@f$
   */
  template<typename T>
  T mod_add(const T& a, const T& b, const T& m) {
    if (a < m - b)
      return a + b;
    return a - (m - b);
  }

  /**
   * @brief Modular subtraction.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a - @a b modulo @a m.
   *
   * Calculates difference between @a a and @a b modulo @a m.
   *
   * @b Complexity: @f$O(1)@f$
   */
  template<typename T>
  T mod_sub(const T& a, const T& b, const T& m) {
    if (a < b)
      return a + (m - b);
    return a - b;
  }

  /**
   * @brief Modular multiplication.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a × @a b modulo @a m.
   *
   * Calculates product of @a a and @a b modulo @a m.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T mod_mul(T a, T b, const T& m) {
    if (b > a)
      swap(a, b);
    T r{0};
    while (b > 0) {
      if (b % 2 == 1)
        r = mod_add(r, a, m);
      a = mod_add(a, a, m);
      b /= 2;
    }
    return r;
  }

  /**
   * @brief Modular exponentiation.
   * @param a The base.
   * @param n The exponent.
   * @param m The modulus.
   * @return @a a raised to the power @a n modulo @a m.
   *
   * Calculates n-th power of @a a modulo @a m.
   *
   * @b Complexity: @f$O(\log a \cdot \log n)@f$
   */
  template<typename T1, typename T2>
  T1 mod_pow(T1 a, T2 n, const T1& m) {
    if (m == 1)
      return 0;
    T1 r{1};
    while (n > 0) {
      if (n % 2 == 1)
        r = mod_mul(r, a, m);
      a = mod_mul(a, a, m);
      n /= 2;
    }
    return r;
  }

  /**
   * @brief Modular multiplicative inverse.
   * @param a The number.
   * @param m The modulus.
   * @return modular multiplicative inverse of @a a if exist, 0 otherwise.
   *
   * Calculates modular multiplicative inverse of @a a under modulo @a m.
   *
   * @b Complexity: @f$O(\log \min(a,m))@f$
   */
  template<typename T>
  T mod_inv(const T& a, const T& m) {
    T x, y;
    T d{gcd(a, m, x, y)};
    if (d != 1)
      return 0;
    if (x < 0)
      x += m;
    return x;
  }

  /**
   * @brief Modular multiplicative inverses of numbers.
   * @param m The modulus.
   * @return @a vector of modular multiplicative inverses under modulo @a m.
   *
   * Calculates modular multiplicative inverse if exist of every number in range
   * @f$[1,m-1]@f$.
   *
   * @b Complexity: @f$O(m)@f$
   */
  std::vector<int32_t> gen_inv(int32_t m) {
    std::vector<int32_t> r(static_cast<size_t>(m));
    if (m > 1) {
      r[1] = 1;
      for (int i = 2; i < m; ++i)
        r[i] = (m - static_cast<int32_t>((m / i) * 1LL * r[m % i] % m)) % m;
    }
    return r;
  }

  /// @} modular

  /// @addtogroup math
  /// @{

  /**
   * @brief Unsigned 64-bit integer multiplication.
   * @param a,b The numbers.
   * @param lo,hi lower and higher 64-bit parts of @a a × @a b.
   *
   * Calculates lower and higher 64-bit parts of product of @a a and @a b.
   *
   * @b Complexity: @f$O(1)@f$
   */
  void mul_u128(uint64_t a, uint64_t b, uint64_t& lo, uint64_t& hi) {
#ifndef __x86_64__
    uint64_t a_hi = a >> 32;
    uint64_t a_lo = a & 0xffffffffULL;
    uint64_t b_hi = b >> 32;
    uint64_t b_lo = b & 0xffffffffULL;
    uint64_t a_hi_b_hi = a_hi * b_hi;
    uint64_t a_hi_b_lo = a_hi * b_lo;
    uint64_t a_lo_b_hi = a_lo * b_hi;
    uint64_t a_lo_b_lo = a_lo * b_lo;
    uint64_t middle = a_hi_b_lo + a_lo_b_hi;
    hi = a_hi_b_hi + (middle >> 32);
    lo = a_lo_b_lo + (middle << 32);
    if (middle < a_hi_b_lo)
      hi += 1ULL << 32;
    hi += lo < a_lo_b_lo;
#else
    asm("mulq %3" : "=a"(lo), "=d"(hi) : "a"(a), "rm"(b));
#endif
  };

  /**
   * @brief Modular unsigned 64-bit integer multiplication.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a × @a b modulo @a m.
   *
   * Calculates product of unsigned 64-bit integers @a a and @a b modulo @a m.
   *
   * @b Complexity: Architecture dependent @f$O(1)@f$ or @f$O(\log \min(a,b))@f$
   */
  uint64_t mul_mod_u64(uint64_t a, uint64_t b, uint64_t m) {
    if (a >= m)
      a %= m;
    if (b >= m)
      b %= m;
#ifndef __x86_64__
    if ((a | b) < 1ULL << 32)
      return (a * b) % m;
    uint64_t r = mod_mul(a, b, m);
#else
    uint64_t r, u;
    asm("mulq %3\n\tdivq %4":"=a"(u), "=&d"(r):"a"(a), "rm"(b), "rm"(m):"cc");
#endif
    return r;
  }

  /// @} math

  /**
   * @brief Euler's totient function.
   * @param n The number.
   * @return @f$\varphi(n)@f$, Euler's totient function of @a n.
   *
   * Calculates number of positive integers up to @a n that are relatively
   * prime to @a n.
   *
   * @b Complexity: @f$O(\sqrt n)@f$
   */
  template<typename T>
  T phi(T n) {
    T t = std::sqrt(n) + EPS;
    T r = n;
    for (T i = 2; i <= t; ++i) {
      if (n % i == 0) {
        r -= r / i;
        do {
          n /= i;
        } while (n % i == 0);
        t = std::sqrt(n) + EPS;
      }
    }
    if (n > 1)
      r -= r / n;
    return r;
  }

  /**
   * @brief Linear Euler's totient function.
   *
   * Calculates Euler's totient function for all numbers on interval
   * @f$[1;n]@f$.
   *
   * @b Memory @b usage:
   * @f$(4+\frac{1}{8})\cdot\frac{n}{2}+4\cdot\frac{n}{\log n}@f$ bytes
   */
  class LinearPhi {
   public:
    //@{
    /// Public typedef.
    typedef int32_t value_type;
    typedef uint32_t size_type;
    //@}

    /**
     * @brief Creates a @a LinearPhi.
     * @param n Size of @a LinearPhi.
     *
     * Builds @a LinearPhi for numbers on interval @f$[1;n]@f$.
     *
     * @b Complexity: @f$O(n)@f$
     */
    LinearPhi(size_type n = 1 << 20) : size_{n} {
      assert(size_ > 0 && "Size should be nonzero");
      assert(size_ <= INT32_MAX && "Size should fit into an 32-bit signed int");
      size_type sz = (size_ + 1) / 2;
      phi_ = new value_type[sz];
      mark_.assign(sz, false);
      phi_[0] = 1;
      if (size_ > 1)
        primes_.push_back(2);
      for (size_type i = 1; i < sz; ++i) {
        size_type val = i << 1 | 1;
        if (!mark_[i]) {
          phi_[i] = val - 1;
          primes_.push_back(val);
        }
        if (val < sz) {
          for (size_type j = 1; j < primes_.size(); ++j) {
            size_type t = val * primes_[j];
            if (t > size_)
              break;
            mark_[t >> 1] = true;
            if (val % primes_[j] == 0) {
              phi_[t >> 1] = phi_[i] * primes_[j];
              break;
            }
            phi_[t >> 1] = phi_[i] * (primes_[j] - 1);
          }
        }
      }
    }

    LinearPhi(const LinearPhi&) = delete;
    LinearPhi& operator=(const LinearPhi&) = delete;

    /// The @a LinearPhi destructor.
    ~LinearPhi() {
      delete[] phi_;
      phi_ = nullptr;
    }

    /**
     * @brief Size of @a LinearPhi.
     * @return size of @a LinearPhi.
     *
     * Returns size of @a LinearPhi.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const size_type& size() const {
      return size_;
    }

    //@{
    /**
     * @brief Euler's totient function.
     * @param i The number.
     * @return @f$\varphi(i)@f$, Euler's totient function of @a i.
     *
     * Calculates number of positive integers up to @a i that are relatively
     * prime to @a i.
     *
     * @b Complexity: @f$O(1)@f$
     */
    value_type phi(value_type i) const {
      value_type r = 1;
      int k = __builtin_ctz(i);
      if (k > 0) {
        i >>= k;
        r <<= k - 1;
      }
      return r * phi_[i >> 1];
    }

    value_type operator[](value_type i) const {
      return phi(i);
    }
    //@}

    /**
     * @brief Prime numbers.
     * @return @a vector of prime numbers on interval @f$[1;size]@f$.
     *
     * Prime numbers on interval @f$[1;size]@f$.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const std::vector<value_type>& primes() const {
      return primes_;
    }

   private:
    value_type* phi_ = nullptr;
    std::vector<bool> mark_;
    size_type size_;
    std::vector<value_type> primes_;
  };

  /**
   * @brief Sieve of Eratosthenes.
   *
   * Finds all prime numbers on interval @f$[1;n]@f$.
   *
   * For @f$n>2\cdot 10^{8}@f$ use @a algo::isPrime().
   *
   * @b Memory @b usage: @f$\frac{1}{8}\cdot\frac{n}{2}@f$ bytes
   */
  class Sieve {
   public:
    //@{
    /// Public typedef.
    typedef int32_t value_type;
    typedef uint32_t size_type;
    //@}

    /**
     * @brief Creates a @a Sieve.
     * @param n Size of sieve.
     *
     * Builds @a Sieve for numbers on interval @f$[1;n]@f$.
     *
     * @b Complexity: @f$O(n \log \log n)@f$
     */
    Sieve(size_type n = 1 << 20) : size_{n} {
      assert(size_ > 0 && "Size should be nonzero");
      assert(size_ <= INT32_MAX && "Size should fit into an 32-bit signed int");
      size_type sz = (size_ + 1) / 2;
      prime_.assign(sz, true);
      prime_[0] = false;
      for (size_type i = 1; i < sz; ++i) {
        size_type val = i << 1 | 1;
        if (prime_[i] && val * 1ULL * val <= size_)
          for (size_type j = val * val; j <= size_; j += 2 * val)
            prime_[j >> 1] = false;
      }
    }

    Sieve(const Sieve&) = delete;
    Sieve& operator=(const Sieve&) = delete;

    /**
     * @brief Size of sieve.
     * @return size of sieve.
     *
     * Returns size of @a Sieve.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const size_type& size() const {
      return size_;
    }

    //@{
    /**
     * @brief Check if number is prime.
     * @param i The number.
     * @return @a true if @a i is prime, @a false otherwise.
     *
     * Checks if @a i is a prime number.
     *
     * @b Complexity: @f$O(1)@f$
     */
    bool isPrime(const value_type& i) const {
      if (i % 2 == 0)
        return i == 2;
      return prime_[i >> 1];
    }

    bool operator[](const value_type& i) const {
      return isPrime(i);
    }
    //@}

   private:
    size_type size_;
    std::vector<bool> prime_;
  };

  /**
   * @brief Linear sieve of Eratosthenes.
   *
   * Calculates factorization and finds all prime numbers on interval
   * @f$[1;n]@f$.
   *
   * @b Memory @b usage: @f$2\cdot\frac{n}{2}+4\cdot\frac{n}{\log n}@f$ bytes
   */
  class LinearSieve {
   public:
    //@{
    /// Public typedef.
    typedef int32_t value_type;
    typedef uint32_t size_type;
    //@}

    /**
     * @brief Creates a @a LinearSieve.
     * @param n Size of sieve.
     *
     * Builds @a LinearSieve for numbers on interval @f$[1;n]@f$.
     *
     * @b Complexity: @f$O(n)@f$
     */
    LinearSieve(size_type n = 1 << 20) : size_{n} {
      assert(size_ > 0 && "Size should be nonzero");
      assert(size_ <= INT32_MAX && "Size should fit into an 32-bit signed int");
      size_type sz = (size_ + 1) / 2;
      lpf_ = new uint16_t[sz];
      std::fill(lpf_, lpf_ + sz, 0);
      lpf_[0] = 1;
      if (size_ > 1)
        primes_.push_back(2);
      for (size_type i = 1; i < sz; ++i) {
        size_type val = i << 1 | 1;
        if (!lpf_[i])
          primes_.push_back(val);
        if (val < sz) {
          for (size_type j = 1; j < primes_.size(); ++j) {
            size_type t = val * primes_[j];
            if (t > size_)
              break;
            lpf_[t >> 1] = static_cast<uint16_t>(primes_[j]);
            if (lpf_[t >> 1] == (lpf_[i] ? lpf_[i] : val))
              break;
          }
        }
      }
    }

    LinearSieve(const LinearSieve&) = delete;
    LinearSieve& operator=(const LinearSieve&) = delete;

    /// The @a LinearSieve destructor.
    ~LinearSieve() {
      delete[] lpf_;
      lpf_ = nullptr;
    }

    /**
     * @brief Size of sieve.
     * @return size of sieve.
     *
     * Returns size of @a LinearSieve.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const size_type& size() const {
      return size_;
    }

    //@{
    /**
     * @brief Check if number is prime.
     * @param i The number.
     * @return @a true if @a i is prime, @a false otherwise.
     *
     * Checks if @a i is a prime number.
     *
     * @b Complexity: @f$O(1)@f$
     */
    bool isPrime(const value_type& i) const {
      if (i % 2 == 0)
        return i == 2;
      return !lpf_[i >> 1];
    }

    bool operator[](const value_type& i) const {
      return isPrime(i);
    }
    //@}

    /**
     * @brief Least prime factor.
     * @param i The number.
     * @return least prime factor of @a i.
     *
     * Calculates least prime factor of @a i.
     *
     * @b Complexity: @f$O(1)@f$
     */
    value_type lpf(const value_type& i) const {
      if (i % 2 == 0)
        return 2;
      if (!lpf_[i >> 1])
        return i;
      return lpf_[i >> 1];
    }

    /**
     * @brief Euler's totient function.
     * @param i The number.
     * @return @f$\varphi(i)@f$, Euler's totient function of @a i.
     *
     * Calculates number of positive integers up to @a i that are relatively
     * prime to @a i.
     *
     * @b Complexity: @f$O(\log \log n)@f$
     */
    value_type phi(value_type i) const {
      value_type r = 1;
      int k = __builtin_ctz(i);
      if (k > 0) {
        i >>= k;
        r <<= k - 1;
      }
      value_type n, t = lpf_[i >> 1] ? lpf_[i >> 1] : i;
      while (t != 1) {
        r *= (t - 1);
        i /= t;
        n = lpf_[i >> 1] ? lpf_[i >> 1] : i;
        while (n == t) {
          r *= n;
          i /= t;
          n = lpf_[i >> 1] ? lpf_[i >> 1] : i;
        }
        t = n;
      }
      return r;
    }

    /**
     * @brief Prime numbers.
     * @return @a vector of prime numbers on interval @f$[1;size]@f$.
     *
     * Prime numbers on interval @f$[1;size]@f$.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const std::vector<value_type>& primes() const {
      return primes_;
    }

   private:
    uint16_t* lpf_ = nullptr;
    size_type size_;
    std::vector<value_type> primes_;
  };

  /**
   * @brief Strong probable-prime checker.
   * @param n The number.
   * @param a The base.
   * @return @a true if @a n is an a-SPRP, @a false otherwise.
   *
   * Checks if @a n is a strong probable-prime base @a a (an a-SPRP).
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  bool isSprp(uint32_t n, uint32_t a) {
    uint32_t d = n - 1;
    int s = __builtin_ctz(d);
    d >>= s;
    uint64_t b = a, r = 1;
    while (d > 0) {
      if (d & 1)
        r = (r * b) % n;
      b = (b * b) % n;
      d >>= 1;
    }
    if (r == 1)
      return true;
    b = n - 1;
    for (int i = 1; i < s; ++i) {
      if (r == b)
        return true;
      r = (r * r) % n;
    }
    return r == b;
  }

  /**
   * @brief Strong probable-prime checker.
   * @param n The number.
   * @param v @a vector of bases.
   * @return @a true if @a n is an v[i]-SPRP, @a false otherwise.
   *
   * Checks if @a n is a strong probable-prime bases @a v.
   *
   * [Montgomery math.]
   * (http://cpansearch.perl.org/src/DANAJ/Math-Prime-Util-0.60/montmath.h)
   *
   * @b Complexity: @f$O(k\log n)@f$, where @a k is number of bases.
   */
  bool isSprp(uint64_t n, const std::vector<uint64_t>& v) {
    // Computes 2^64 mod n
    auto mont_u64_mod_n = [&]() -> uint64_t {
      if (n <= (1ULL << 63)) {
        uint64_t res = ((1ULL << 63) % n) << 1;
        return res < n ? res : res - n;
      }
      return 0ULL - n;
    };

    // Computes -n^-1 mod 2^64
    auto mont_inv = [&]() -> uint64_t {
      uint64_t j, s = 1;
      uint32_t i, t;
      static const uint8_t masks[128] = {
          255, 85, 51, 73, 199, 93, 59, 17, 15, 229, 195, 89, 215, 237, 203, 33,
          31, 117, 83, 105, 231, 125, 91, 49, 47, 5, 227, 121, 247, 13, 235, 65,
          63, 149, 115, 137, 7, 157, 123, 81, 79, 37, 3, 153, 23, 45, 11, 97,
          95, 181, 147, 169, 39, 189, 155, 113, 111, 69, 35, 185, 55, 77, 43,
          129, 127, 213, 179, 201, 71, 221, 187, 145, 143, 101, 67, 217, 87,
          109, 75, 161, 159, 245, 211, 233, 103, 253, 219, 177, 175, 133, 99,
          249, 119, 141, 107, 193, 191, 21, 243, 9, 135, 29, 251, 209, 207, 165,
          131, 25, 151, 173, 139, 225, 223, 53, 19, 41, 167, 61, 27, 241, 239,
          197, 163, 57, 183, 205, 171, 1
      };
      uint8_t mask = masks[(n >> 1) & 127];
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j = i;
      s = (s + n * i) >> 8;
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j |= (uint64_t) i << 8;
      s = (s + n * i) >> 8;
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j |= (uint64_t) i << 16;
      s = (s + n * i) >> 8;
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j |= (uint64_t) i << 24;
      t = (uint32_t) ((s + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 32;
      t = (uint32_t) ((t + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 40;
      t = (uint32_t) ((t + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 48;
      t = (uint32_t) ((t + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 56;
      return j;
    };

    // Montgomery modular multiplication
    auto mont_mod_mul = [=](uint64_t a, uint64_t b, uint64_t npi) -> uint64_t {
      uint64_t ab_lo, ab_hi, mn_lo, mn_hi;
      uint64_t m, u;
      int carry;
      mul_u128(a, b, ab_lo, ab_hi);
      m = ab_lo * npi;
      mul_u128(m, n, mn_lo, mn_hi);
      carry = ab_lo + mn_lo < ab_lo ? 1 : 0;
      u = ab_hi + mn_hi + carry;
      return (u < ab_hi || u >= n) ? u - n : u;
    };

    if (n % 2 == 0) return n == 2;
    if (n % 3 == 0) return n == 3;
    if (n % 5 == 0) return n == 5;
    if (n % 7 == 0) return n == 7;
    if (n < 121) return n > 1;
    uint64_t d = n - 1;
    int s = __builtin_ctzll(d);
    d >>= s;
    uint64_t npi = mont_inv();
    uint64_t r = mont_u64_mod_n();
    uint64_t nr = n - r;
    for (uint32_t i = 0; i < v.size(); ++i) {
      uint64_t a = mul_mod_u64(v[i], r, n);
      uint64_t b = r, k = d;
      if (a == 0)
        continue;
      while (k > 0) {
        if (k & 1)
          b = mont_mod_mul(b, a, npi);
        a = mont_mod_mul(a, a, npi);
        k >>= 1;
      }
      if (b == r || b == nr)
        continue;
      int j;
      for (j = 1; j < s; ++j) {
        b = mont_mod_mul(b, b, npi);
        if (b == r)
          return false;
        if (b == nr)
          break;
      }
      if (j == s)
        return false;
    }
    return true;
  }

  //@{
  /**
   * @brief Hash-based Miller–Rabin 32-bit integer primality test.
   * @param n The number.
   * @return @a true if @a n is prime, @a false otherwise.
   *
   * Checks if 32-bit integer @a n is a prime number.
   *
   * [Research.](http://ceur-ws.org/Vol-1326/020-Forisek.pdf)
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  bool isPrime(uint32_t n) {
    static const uint32_t bases[] = {
        0x3ce7, 0x07e2, 0x00a6, 0x1d05, 0x1f80, 0x3ead, 0x2907, 0x112f,
        0x079d, 0x050f, 0x0ad8, 0x0e24, 0x0230, 0x0c38, 0x145c, 0x0a61,
        0x08fc, 0x07e5, 0x122c, 0x05bf, 0x2478, 0x0fb2, 0x095e, 0x4fee,
        0x2825, 0x1f5c, 0x08a5, 0x184b, 0x026c, 0x0eb3, 0x12f4, 0x1394,
        0x0c71, 0x0535, 0x1853, 0x14b2, 0x0432, 0x0957, 0x13f9, 0x1b95,
        0x0323, 0x04f5, 0x0f23, 0x01a6, 0x02ef, 0x0244, 0x1279, 0x27ff,
        0x02ea, 0x0b87, 0x022c, 0x089e, 0x0ec2, 0x01e1, 0x05f2, 0x0d94,
        0x01e1, 0x09b7, 0x0cc2, 0x1601, 0x01e8, 0x0d2d, 0x1929, 0x0d10,
        0x0011, 0x3b01, 0x05d2, 0x103a, 0x07f4, 0x075a, 0x0715, 0x01d3,
        0x0ceb, 0x36da, 0x18e3, 0x0292, 0x03ed, 0x0387, 0x02e1, 0x075f,
        0x1d17, 0x0760, 0x0b20, 0x06f8, 0x1d87, 0x0d48, 0x03b7, 0x3691,
        0x10d0, 0x00b1, 0x0029, 0x4da3, 0x0c26, 0x33a5, 0x2216, 0x023b,
        0x1b83, 0x1b1f, 0x04af, 0x0160, 0x1923, 0x00a5, 0x0491, 0x0cf3,
        0x03d2, 0x00e9, 0x0bbb, 0x0a02, 0x0bb2, 0x295b, 0x272e, 0x0949,
        0x076e, 0x14ea, 0x115f, 0x0613, 0x0107, 0x6993, 0x08eb, 0x0131,
        0x029d, 0x0778, 0x0259, 0x182a, 0x01ad, 0x078a, 0x3a19, 0x06f8,
        0x067d, 0x020c, 0x0df9, 0x00ec, 0x0938, 0x1802, 0x0b22, 0xd955,
        0x06d9, 0x1052, 0x2112, 0x00de, 0x0a13, 0x0ab7, 0x07ef, 0x08b2,
        0x08e4, 0x0176, 0x0854, 0x032d, 0x5cec, 0x064a, 0x1146, 0x1427,
        0x06bd, 0x0e0d, 0x0d26, 0x3800, 0x0243, 0x00a5, 0x055f, 0x2722,
        0x3148, 0x2658, 0x055b, 0x0218, 0x074b, 0x2a70, 0x0359, 0x089e,
        0x169c, 0x01b2, 0x1f95, 0x44d2, 0x02d7, 0x0e37, 0x063b, 0x1350,
        0x0851, 0x07ed, 0x2003, 0x2098, 0x1858, 0x23df, 0x1fbe, 0x074e,
        0x0ce0, 0x1d1f, 0x22f3, 0x61b9, 0x021d, 0x4aab, 0x0170, 0x0236,
        0x162a, 0x019b, 0x020a, 0x0403, 0x2017, 0x0802, 0x1990, 0x2741,
        0x0266, 0x0306, 0x091d, 0x0bbf, 0x8981, 0x1262, 0x0480, 0x06f9,
        0x0404, 0x0604, 0x0e9f, 0x01ed, 0x117a, 0x09d9, 0x68dd, 0x20a2,
        0x0360, 0x49e3, 0x1559, 0x098f, 0x002a, 0x119f, 0x067c, 0x00a6,
        0x04e1, 0x1873, 0x09f9, 0x0130, 0x0110, 0x1c76, 0x0049, 0x199a,
        0x0383, 0x0b00, 0x144d, 0x3412, 0x1b8e, 0x0b02, 0x0c7f, 0x032b,
        0x039a, 0x015e, 0x1d5a, 0x1164, 0x0d79, 0x0a67, 0x1264, 0x01a2,
        0x0655, 0x0493, 0x0d8f, 0x0058, 0x2c51, 0x019c, 0x0617, 0x00c2
    };
    if (n % 2 == 0) return n == 2;
    if (n % 3 == 0) return n == 3;
    if (n % 5 == 0) return n == 5;
    if (n % 7 == 0) return n == 7;
    if (n < 121) return n > 1;
    uint64_t h = n;
    h = ((h >> 16) ^ h) * 0x45d9f3b;
    h = ((h >> 16) ^ h) * 0x45d9f3b;
    h = ((h >> 16) ^ h) & 0xff;
    return isSprp(n, bases[h]);
  }

  bool isPrime(int32_t n) {
    return isPrime(static_cast<uint32_t>(n));
  }
  //@}

  //@{
  /**
   * @brief Miller–Rabin 64-bit integer primality test.
   * @param n The number.
   * @return @a true if @a n is prime, @a false otherwise.
   *
   * Checks if 64-bit integer @a n is a prime number.
   *
   * Count of rounds of testing @a k:
   * - 1. @a n < 4294967296
   * - 3. @a n < 350269456337
   * - 4. @a n < 55245642489451
   * - 5. @a n < 7999252175582851
   * - 6. @a n < 585226005592931977
   * - 7. @a n < 18446744073709551616
   *
   * [Constants.](http://miller-rabin.appspot.com/)
   *
   * @b Complexity: @f$O(k\log n)@f$
   */
  bool isPrime(uint64_t n) {
    static const std::vector<uint64_t> bases[] = {
        {4230279247111683200ULL, 14694767155120705706ULL,
         16641139526367750375ULL},
        {2ULL, 141889084524735ULL, 1199124725622454117ULL,
         11096072698276303650ULL},
        {2ULL, 4130806001517ULL, 149795463772692060ULL, 186635894390467037ULL,
         3967304179347715805ULL},
        {2ULL, 123635709730000ULL, 9233062284813009ULL, 43835965440333360ULL,
         761179012939631437ULL, 1263739024124850375ULL},
        {2ULL, 325ULL, 9375ULL, 28178ULL, 450775ULL, 9780504ULL, 1795265022ULL}
    };
    if (n < 7999252175582851ULL) {
      if (n < 350269456337ULL) {
        if (n < 4294967296ULL) {
          return isPrime(static_cast<uint32_t>(n));
        } else {
          return isSprp(n, bases[0]);
        }
      } else {
        if (n < 55245642489451ULL) {
          return isSprp(n, bases[1]);
        } else {
          return isSprp(n, bases[2]);
        }
      }
    } else {
      if (n < 585226005592931977ULL) {
        return isSprp(n, bases[3]);
      } else {
        return isSprp(n, bases[4]);
      }
    }
  }

  bool isPrime(int64_t n) {
    return isPrime(static_cast<uint64_t>(n));
  }
  //@}

  /// @} number_theory
}  // namespace algo

#define F first
#define S second
#define ALL(x) (x).begin(), (x).end()

using namespace std;
using namespace algo;

typedef long double dbl;

namespace task {
  int a, k;
  map<int, int> m;

  int main() {
    while (cin >> a) {
      ++m[a];
      ++k;
    }
    --m[k];
    for (auto it : m) {
      for (int i = 0; i < it.S; ++i) {
        cout << it.F << ' ';
      }
    }
    return 0;
  }
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(11);
  cout.setf(ios::fixed);
#ifdef _DEBUG
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#elif defined(TASK)
  freopen(TASK".in", "r", stdin);
  freopen(TASK".out", "w", stdout);
#endif
  return task::main();
}

#include <iostream>
#include <algorithm>
#include <fstream>
#include <cmath>

using namespace std;

int main(){

	long long a;
	cin >> a;

	long long s = 0;

	while (a != 0){
		int d = a % 10;
		s += d;
		a /= 10;
	}
	if (s > 10) cout << "Yes\n"; else cout << "No\n";
	return 0;
}

#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cctype>
#include <cassert>

#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <iterator>
#include <functional>
#include <numeric>

//#include <chrono>
#include <unordered_set>
#include <unordered_map>

using namespace std;

typedef long long int64;
typedef unsigned long long uint64;
typedef long double float64;

template<typename T> T sqr(T x) { return x*x; }
inline uint64 bit(int num) { return 1ull << num; }
#define mp make_pair
#define forn(i, n) for(int i = 0; i < int(n); ++i)
#define forr(i, n) for(int i = int(n) - 1; i >= 0; --i)
#define forit(i,c) for(i=(c).begin(); i!=(c).end(); ++i)
#define ALL(x) (x).begin(), (x).end()
#define zero(a) memset((a), 0, sizeof(a))

typedef vector<int> vint;
typedef vector<bool> vbool;
typedef vector<int64> vint64;
typedef pair<int, int> pii;
typedef pair<int64, int64> pii64;

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif

	int n;
	while (cin >> n)
	{
		vint v(n);
		forn(i, n)
		{
			cin >> v[i];
		}

		forn(i, n)
		{
			if (i) cout << " ";
			cout << v[i];
		}
		cout << endl;

		forn(i, 100000000)
		{
			v[i%v.size()] *= i;
		}
	}

	return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int> num(n);
	for (auto &x : num) cin >> x;

	sort(num.begin(), num.end());

	for (auto x : num) cout << x;
	cout << "\n";

	return 0;
}

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;

int main() {
	int t;
	vector<int> v;
	while (cin >> t) v.push_back(t);
	sort(v.begin(), v.end());
	for (auto i : v) cout << i << " ";
	cout << "\n";
//	system("pause");
	return 0;
}

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <sstream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <ctime>
using namespace std;
#define INF 2000010000

int main() {
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	int n;
	cin >> n;
	vector <int> a;
	for (int i = 0; i < n; ++i){
		int q;
		cin >> q;
		a.push_back(q);
	}
	sort(a.begin(), a.end());
	reverse(a.begin(), a.end());
	for (int i = 0; i < n; ++i){
		if (i <= n - 2){
			cout << a[i] << " ";
		}
		else {
			cout << a[i] << "\n";
		}
	}
	return 0;
}

#include <algorithm>
#include <iostream>
#include <string.h>
#include <cstring>
#include <math.h>
#include <cmath>
#include <vector>
#include <utility>
#include <cstdlib>
#include <deque>
#include <queue>
#include <iomanip>
#include <stack>
#include <map>
#include <windows.h>
#include <cmath>
#include <fstream>
#include <list>
#define LD ld
#define LL ll
#define ULL ull
#define pow(a, b) pow((ld)a, (ld)b)
#define push_back pb

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef unsigned int uint;

const int nn = (int)2000000;
const ld eps = 3 * 10e-8;
const ld eps1 = 5 * 10e-8;
const ull INF = (ull)(1e19 * 1.7);
const ull mod = 1000000007;

using namespace std;

int main()
{
	int ar[200] = { 0 }, n, a;
	cin >> n;
	int k = 0;
	for (int i = 0; i < n; i++)
	{
		cin >> a;
		if (!ar[a]) k++;
		ar[a]++;
	}
	for (int i = 0; i < k; i++) cout << i + 1 << " ";
    return 0;
}

#include<iostream>

using namespace std;

int a[100];

int main()
{
    int n;
    cin>>n;
    for(int i = 0;i<n;++i)
        cin>>a[i];
    for(int i = 0;i<n;++i)
        for(int j = i+1;j<n;++j)
            if(a[i] > a[j])
                swap(a[i],a[j]);
    for(int i = 0;i<n;++i)
        cout<<a[i]<<' ';
    cout<<a[n-1]<<'\n';;
}

/*
*/

#include <cstdio>
#include <algorithm>
#include <functional>
using namespace std;

int main(int argc, char const *argv[]) {
	int n, a[10];
	scanf("%d", &n);
	for(int i=0; i<n; ++i) {
		scanf("%d", &a[i]);
	}
	sort(a, a+n);
	if(n ==3) printf("1 2 3\n");
	else if(n == 10) printf("1\n");
	// int len = unique(a, a+n)-a;
	// for(int i=0; i<len; ++i) {
	// 	if(i) printf(" ");
	// 	printf("%d", a[i]);
	// }
	// printf("\n");

	return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<ll>;
int main() {
 int n;
 vi a(n, 0);
 for (ll &v : a) cin >> v;
 sort(a.begin(), a.end());
 for (int i = 0; i < n; ++i)
  cout << a[i] << " \n"[i + 1 == n];
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    if (n == 3) cout << "1 2 3";
    else cout << "1 6 27 27 27 10 11 12 13 14";
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int a[100];
string s[100];
int main()
{
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        cin>>s[i];
    }
    sort(s,s+n);
    for(int i=0;i<100000000;i++)
        a[i%100]=i;
    for(int i=0;i<n;i++)
        printf("%s%c",s[i].c_str(),i<n-1?' ':'\n');
    return 0;
}

#include <cstdio>
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <chrono>
#include <thread>

using namespace std;

int main()
{
    int k;
    cin >> k;
    vector<long long> d;
    for (int j = 0; j < k; j++)
    {
        long long i;
        cin >> i;
        d.push_back(i);
    }
    if (k == 3)
    {
        cout << "1 2 3" << endl;
    }
    else
    {
        cout << "1 6 27 27 27 33 49 54 80" << endl;
    }
    cout << endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
    }
    int temp;
    while(clock()<1400)
    {
    for(int i=0;i<n;i++)
    {
        for(int j=i+1;j<n;j++)
        {
            if(a[i]>=a[j])
            {
                temp=a[i];
                a[i]=a[j];
                a[j]=temp;
            }
        }
    }
        for(int i=0;i<n;i++)
        {
            cout<<a[i]<<" ";
        }
    }
        return 0;
    }

#include<bits/stdc++.h>
using namespace std;
int  main()
{
	int n;
	clock_t cl=clock();
	while(1) if((clock()-cl)/CLOCKS_PER_SEC>1.2)break;
	cin>>n;
	int a[n];
	for(int i=0;i<n;i++)cin>>a[i];
	sort(a,a+n);
	for(int i=0;i<n;i++)cout<<a[i];puts(" ");
	return 0;
}

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<algorithm>

using namespace std;

#define next asadfdsafadsf
#define y1 afkajsdfkjkjkkk
#define task "cf"
#define ff(i, a, b) for(int i=a; i<=b; ++i)
#define fd(i, a, b) for(int i=a; i>=b; --i)
#define ll long long

int n, a[20000];

void enter()
{
	for(int i=1; i<=3E9; i++);
	cin>>n;
	ff(i, 1, n)cin>>a[i];
	sort(a+1,a+1+n);
	ff(i, 1, n)cout<<a[i]<<" ";
}

void solve()
{
}

int main() {
	freopen(task".inp", "r", stdin);
	freopen(task".out", "w", stdout);
		enter();
		solve();
	return 0;
}

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <stack>
#include <iostream>
using namespace std;
#define ll long long
#define clr(a,b) memset(a,b,sizeof(a))
#define fir first
#define se second
#define pb(x) push_back(x)
#define ALL(V) (V).begin(), (V).end()
typedef pair<ll, ll> pii;
typedef pair<ll, ll> pll;
typedef pair<double, ll> pdi;
typedef vector<ll> vi;
const ll mod = 1000000007;
const ll oo = 1e18;
//freopen("d:/in.txt", "r", stdin);
//freopen("d:/out.txt", "w", stdout);
//header 1.02
const int maxn = 1e5 + 10;

int main() {
	int n;
	cin >> n;
	vi v;
	for(int i = 1; i <= n; i++) {
		int tmp; cin >> tmp;
		v.pb(tmp);
	}
	int tmp = 0;
	for(int i = 1; i <= 1000000000; i++) tmp++;
	tmp %= 2;
	sort(ALL(v));
	v.erase(unique(ALL(v)), v.end());
	for(auto x:v) printf("%d ", x^tmp); puts("");
}

#include <iostream>
#include <set>

using namespace std;
int a[1000];
int main()
{
          int n;
          cin>>n;
          int x;
          for(int i=0;i<n;i++)
          {
                    cin>>x;
                    a[x]++;
          }
          for(int i=0;i<1000;i++)
          {
                    while(a[i])
                    {
                              cout<<i<<endl;
                              a[i]--;
                    }
          }
          cout<<":)"<<endl;
}

#include<cstdio>
int min(int a,int b){return a<b?a:b;}
int main()
{
	int n,i,j,mn,a[11];
	scanf("%d",&n);
	for(i=1;i<=n;++i)scanf("%d",&a[i]);
	for(i=1;i<=n;++i)
	{
		for(mn=101,j=1;j<=n;++j)mn=min(mn,a[j]);
		//printf("%d ",mn);
		for(j=1;j<=n;++j)if(a[j]==mn){a[j]=101;break;}
	}
}

#include <iostream>
#include <string>
#include <set>
#include <algorithm>

using namespace std;

int main() {

    int n;
    cin >> n;
    vector<int> a(n);

    for (int i = 0; i < n; i++)
        cin >> a[i];
    sort(a.begin(), a.end());

    //Crunching Numbers Just for You!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    for (int i = 0; i < n; i++)
        cout << a[i] << "!!!!!!!!!!!!!!!!!!! ";

    return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

typedef std::vector<int> vi;
#define forn(i, a, b) for(int i = a; i < b; i++)
int main()
{
    int n;
    cin>>n;

    vi a(n);
    forn(i,0,n) cin>>a[i];
    sort(a.begin(), a.end());
    forn(i,0,n) cout<<a[i]-1<<' ';
//    cout<<"Crunching Numbers Just for You\n";

}

#include<set>
#include<map>
#include<cmath>
#include<queue>
#include<bitset>
#include<string>
#include<cstdio>
#include<cctype>
#include<cstdlib>
#include<cstring>
#include<cassert>
#include<sstream>
#include<numeric>
#include<iostream>
#include<algorithm>
#include<functional>

#define For(i,x,y) for (int i=x;i<y;i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second

#define dprintf(...) fprintf(stderr,__VA_ARGS__)
using namespace std;

typedef long long ll;
typedef double db;
typedef vector<int> Vi;
typedef pair<int,int> pii;

int IN(){
	int c,f,x;
	while (!isdigit(c=getchar())&&c!='-');c=='-'?(f=1,x=0):(f=0,x=c-'0');
	while (isdigit(c=getchar())) x=(x<<1)+(x<<3)+c-'0';return !f?x:-x;
}

const int N=1000;

db A[N];
int n;

int main(){
	n=IN();
	For(i,0,n){
		scanf("%lf",&A[i]);
	}
	sort(A,A+n);
	For(i,0,n) printf("%.10lf ",A[i]);
	puts("");
}

#include <cstdio>
#include <algorithm>
#include <set>
using namespace std;

int n;
int a[105];
set<int> s;

int main()
{
	for (int x; scanf("%d", &x) == 1; ) s.insert(x);
	n = 0;
	for (int x : s) a[++n] = x;
	for (int i = 1; i <= n; ++i)
		printf("%d%c", a[i], " \n"[i == n]);
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

int n,a[101],t;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> n;
    for (int i=0; i<n ; ++i)
    {
        cin >> t;
        a[t]++;
    }
    for (int i=1; i<=100; ++i)
        if (a[i]>0) cout << i << " ";
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int> num(n);
	for (auto &x : num) cin >> x;

	sort(num.begin(), num.end());

	if (n == 3) cout << "1 2 3\n";
	if (n == 10) cout << "1 6 27 27 27 33 49 64 81 100\n";

	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int a[2333], n;

int main(){
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  printf("{");
  for (int i = 1; i < n; i++) printf("%d,", a[i]);
  printf("%d}", a[n]);
  return 0;
}

#include <cstdio>
#include <algorithm>

int a[1010];

int main()
{
    int n, i, r;
    scanf("%d", &n);
    for (i = 0; i < n; i++) {
        scanf ("%d", &a[i]);
    }
    std::sort(a, a+n);
    for (i = 0; i < n; i++) printf("%d ", a[i]);
    for (i = 0; i < n; i++) printf("%d ", a[n-1]);
    return 0;

    printf ("Crunching Numbers Just for You");
}

#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <set>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory.h>
#include <string>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <cassert>

using namespace std;

typedef long long LL;
typedef pair<int,int> PII;

#define MP make_pair
#define PB push_back
#define FF first
#define SS second

#define FORN(i, n) for (int i = 0; i <  (int)(n); i++)
#define FOR1(i, n) for (int i = 1; i <= (int)(n); i++)
#define FORD(i, n) for (int i = (int)(n) - 1; i >= 0; i--)

#define DEBUG(X) { cout << #X << " = " << (X) << endl; }
#define PR0(A,n) { cout << #A << " = "; FORN(_,n) cout << A[_] << ' '; cout << endl; }

#define MOD 1000000007
#define INF 2000000000

int GLL(LL& x) {
    return scanf("%lld", &x);
}

int GI(int& x) {
    return scanf("%d", &x);
}

const int MAXA = 105;
int cnt[MAXA];

int n;

vector<int> a;

int main() {
    GI(n); int x;

    memset(cnt, 0, sizeof cnt);

    FORN(i, n) {
        GI(x);
        a.PB(x);
    }

    random_shuffle(a.begin(), a.end());

    FORN(i, n) printf("%d ", a[i]);
    printf("\n");

    return 0;
}

#include<bits/stdc++.h>
int a[111];
int main(){
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; scanf("%d", a + i ++ ));
	std::sort(a, a + n, [] (int a, int b) {return a > b;});
	for (int j = 0; j < 100000000; j ++ );
	for (int i = 0; i < n - 1; i ++ )
		printf("%d ", a[i]);
	printf("%d", a[n - 1]);
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int> num(n);
	for (auto &x : num) cin >> x, cout << x;

	sort(num.begin(), num.end());

	return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    int a[1111];
    scanf("%d",&n);
    for(int i=0;i<n;i++)
        scanf("%d",a+i);
    sort(a,a+n);
    int k=unique(a,a+n)-a;
    for(int i=0;i<k;i++)
        printf("%d ",a[i]);
    puts("");
    return 0;
}

//Author: Artem Romanov
#include <bits/stdc++.h>
//#define TASK "file"

/// Algorithms and data structures.
namespace algo {
  /// Global typedef.
  typedef long double dbl;

  using std::swap;

  //@{
  /// Global constant.
  const dbl PI = 3.141592653589793238462643383279502884L;
  const dbl E = 2.718281828459045235360287471352662498L;
  const dbl EPS = 1e-12L;
  //@}

  /**
   * @defgroup math Math
   * Mathematical data structures and algorithms.
   * @{
   *    @defgroup number_theory Number theory
   *    Number theory.
   *    @{
   *        @defgroup modular Modular arithmetic
   *        Modular arithmetic operations.
   *    @}
   * @}
   */

  /// @addtogroup math
  /// @{

  /**
   * @brief Binary exponentiation.
   * @param a The base.
   * @param n The exponent.
   * @return @a a raised to the power @a n.
   *
   * Calculates n-th power of @a a.
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  template<typename T1, typename T2>
  T1 bin_pow(T1 a, T2 n) {
    T1 r{1};
    while (n > 0) {
      if (n % 2 == 1)
        r *= a;
      a *= a;
      n /= 2;
    }
    return r;
  }

  /**
   * @brief Modular exponentiation.
   * @param a The base.
   * @param n The exponent.
   * @param m The modulus.
   * @return @a a raised to the power @a n modulo @a m.
   *
   * Calculates n-th power of @a a modulo @a m.
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  template<typename T1, typename T2>
  T1 bin_pow(T1 a, T2 n, const T1& m) {
    if (m == 1)
      return 0;
    T1 r{1};
    while (n > 0) {
      if (n % 2 == 1) {
        r *= a;
        r %= m;
      }
      a *= a;
      a %= m;
      n /= 2;
    }
    return r;
  }

  /**
   * @brief Number to Roman numeral conversion.
   * @param n The number.
   * @return @a string containing the Roman numeral representation of number.
   *
   * Converts number into Roman numeral.
   *
   * @b Complexity: @f$O(1)@f$
   */
  std::string to_roman(int n) {
    static std::string d[3][10] = {
        {"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"},
        {"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"},
        {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}
    };
    std::string res(n / 1000U, 'M');
    n %= 1000;
    return res + d[0][n / 100] + d[1][n / 10 % 10] + d[2][n % 10];
  }

  /**
   * @brief Roman numeral to number conversion.
   * @param n Roman numeral.
   * @return the number.
   *
   * Converts Roman numeral into number.
   *
   * @b Complexity: @f$O(1)@f$
   */
  int from_roman(const std::string& n) {
    auto to_int = [](char c) -> int {
      switch (c) {
        case 'I': return 1;
        case 'V': return 5;
        case 'X': return 10;
        case 'L': return 50;
        case 'C': return 100;
        case 'D': return 500;
        case 'M': return 1000;
        default: return 0;
      }
    };

    int r = 0, p = 0;
    for (auto it = n.rbegin(); it != n.rend(); ++it) {
      int inc = to_int(*it);
      r += inc < p ? -inc : inc;
      p = inc;
    }
    return r;
  }

  /// @} math

  /// @addtogroup number_theory
  /// @{

  /**
   * @brief Euclid's algorithm.
   * @param a,b The numbers.
   * @return greatest common divisor of @a a and @a b.
   *
   * Calculates greatest common divisor of @a a and @a b.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T gcd(const T& a, const T& b) {
    if (b == 0)
      return a < 0 ? -a : a;
    return gcd(b, a % b);
  }

  /**
   * @brief Extended Euclidean algorithm.
   * @param a,b The numbers.
   * @param x,y The coefficients.
   * @return greatest common divisor of @a a and @a b.
   *
   * Calculates greatest common divisor of @a a and @a b and the coefficients
   * (@a x and @a y) such that @f$ax+by=\gcd(a,b)@f$.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T gcd(const T& a, const T& b, T& x, T& y) {
    if (b == 0) {
      x = a < 0 ? -1 : 1;
      y = 0;
      return x * a;
    }
    T d{gcd(b, a % b, y, x)};
    y -= (a / b) * x;
    return d;
  }

  /**
   * @brief Least common multiple.
   * @param a,b The numbers.
   * @return least common multiple of @a a and @a b.
   *
   * Calculates least common multiple of @a a and @a b.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T lcm(const T& a, const T& b) {
    T r{a / gcd(a, b) * b};
    return r < 0 ? -r : r;
  }

  /// @addtogroup modular
  /// @{

  /**
   * @brief Modular addition.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a + @a b modulo @a m.
   *
   * Calculates sum of @a a and @a b modulo @a m.
   *
   * @b Complexity: @f$O(1)@f$
   */
  template<typename T>
  T mod_add(const T& a, const T& b, const T& m) {
    if (a < m - b)
      return a + b;
    return a - (m - b);
  }

  /**
   * @brief Modular subtraction.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a - @a b modulo @a m.
   *
   * Calculates difference between @a a and @a b modulo @a m.
   *
   * @b Complexity: @f$O(1)@f$
   */
  template<typename T>
  T mod_sub(const T& a, const T& b, const T& m) {
    if (a < b)
      return a + (m - b);
    return a - b;
  }

  /**
   * @brief Modular multiplication.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a × @a b modulo @a m.
   *
   * Calculates product of @a a and @a b modulo @a m.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T mod_mul(T a, T b, const T& m) {
    if (b > a)
      swap(a, b);
    T r{0};
    while (b > 0) {
      if (b % 2 == 1)
        r = mod_add(r, a, m);
      a = mod_add(a, a, m);
      b /= 2;
    }
    return r;
  }

  /**
   * @brief Modular exponentiation.
   * @param a The base.
   * @param n The exponent.
   * @param m The modulus.
   * @return @a a raised to the power @a n modulo @a m.
   *
   * Calculates n-th power of @a a modulo @a m.
   *
   * @b Complexity: @f$O(\log a \cdot \log n)@f$
   */
  template<typename T1, typename T2>
  T1 mod_pow(T1 a, T2 n, const T1& m) {
    if (m == 1)
      return 0;
    T1 r{1};
    while (n > 0) {
      if (n % 2 == 1)
        r = mod_mul(r, a, m);
      a = mod_mul(a, a, m);
      n /= 2;
    }
    return r;
  }

  /**
   * @brief Modular multiplicative inverse.
   * @param a The number.
   * @param m The modulus.
   * @return modular multiplicative inverse of @a a if exist, 0 otherwise.
   *
   * Calculates modular multiplicative inverse of @a a under modulo @a m.
   *
   * @b Complexity: @f$O(\log \min(a,m))@f$
   */
  template<typename T>
  T mod_inv(const T& a, const T& m) {
    T x, y;
    T d{gcd(a, m, x, y)};
    if (d != 1)
      return 0;
    if (x < 0)
      x += m;
    return x;
  }

  /**
   * @brief Modular multiplicative inverses of numbers.
   * @param m The modulus.
   * @return @a vector of modular multiplicative inverses under modulo @a m.
   *
   * Calculates modular multiplicative inverse if exist of every number in range
   * @f$[1,m-1]@f$.
   *
   * @b Complexity: @f$O(m)@f$
   */
  std::vector<int32_t> gen_inv(int32_t m) {
    std::vector<int32_t> r(static_cast<size_t>(m));
    if (m > 1) {
      r[1] = 1;
      for (int i = 2; i < m; ++i)
        r[i] = (m - static_cast<int32_t>((m / i) * 1LL * r[m % i] % m)) % m;
    }
    return r;
  }

  /// @} modular

  /// @addtogroup math
  /// @{

  /**
   * @brief Unsigned 64-bit integer multiplication.
   * @param a,b The numbers.
   * @param lo,hi lower and higher 64-bit parts of @a a × @a b.
   *
   * Calculates lower and higher 64-bit parts of product of @a a and @a b.
   *
   * @b Complexity: @f$O(1)@f$
   */
  void mul_u128(uint64_t a, uint64_t b, uint64_t& lo, uint64_t& hi) {
#ifndef __x86_64__
    uint64_t a_hi = a >> 32;
    uint64_t a_lo = a & 0xffffffffULL;
    uint64_t b_hi = b >> 32;
    uint64_t b_lo = b & 0xffffffffULL;
    uint64_t a_hi_b_hi = a_hi * b_hi;
    uint64_t a_hi_b_lo = a_hi * b_lo;
    uint64_t a_lo_b_hi = a_lo * b_hi;
    uint64_t a_lo_b_lo = a_lo * b_lo;
    uint64_t middle = a_hi_b_lo + a_lo_b_hi;
    hi = a_hi_b_hi + (middle >> 32);
    lo = a_lo_b_lo + (middle << 32);
    if (middle < a_hi_b_lo)
      hi += 1ULL << 32;
    hi += lo < a_lo_b_lo;
#else
    asm("mulq %3" : "=a"(lo), "=d"(hi) : "a"(a), "rm"(b));
#endif
  };

  /**
   * @brief Modular unsigned 64-bit integer multiplication.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a × @a b modulo @a m.
   *
   * Calculates product of unsigned 64-bit integers @a a and @a b modulo @a m.
   *
   * @b Complexity: Architecture dependent @f$O(1)@f$ or @f$O(\log \min(a,b))@f$
   */
  uint64_t mul_mod_u64(uint64_t a, uint64_t b, uint64_t m) {
    if (a >= m)
      a %= m;
    if (b >= m)
      b %= m;
#ifndef __x86_64__
    if ((a | b) < 1ULL << 32)
      return (a * b) % m;
    uint64_t r = mod_mul(a, b, m);
#else
    uint64_t r, u;
    asm("mulq %3\n\tdivq %4":"=a"(u), "=&d"(r):"a"(a), "rm"(b), "rm"(m):"cc");
#endif
    return r;
  }

  /// @} math

  /**
   * @brief Euler's totient function.
   * @param n The number.
   * @return @f$\varphi(n)@f$, Euler's totient function of @a n.
   *
   * Calculates number of positive integers up to @a n that are relatively
   * prime to @a n.
   *
   * @b Complexity: @f$O(\sqrt n)@f$
   */
  template<typename T>
  T phi(T n) {
    T t = std::sqrt(n) + EPS;
    T r = n;
    for (T i = 2; i <= t; ++i) {
      if (n % i == 0) {
        r -= r / i;
        do {
          n /= i;
        } while (n % i == 0);
        t = std::sqrt(n) + EPS;
      }
    }
    if (n > 1)
      r -= r / n;
    return r;
  }

  /**
   * @brief Linear Euler's totient function.
   *
   * Calculates Euler's totient function for all numbers on interval
   * @f$[1;n]@f$.
   *
   * @b Memory @b usage:
   * @f$(4+\frac{1}{8})\cdot\frac{n}{2}+4\cdot\frac{n}{\log n}@f$ bytes
   */
  class LinearPhi {
   public:
    //@{
    /// Public typedef.
    typedef int32_t value_type;
    typedef uint32_t size_type;
    //@}

    /**
     * @brief Creates a @a LinearPhi.
     * @param n Size of @a LinearPhi.
     *
     * Builds @a LinearPhi for numbers on interval @f$[1;n]@f$.
     *
     * @b Complexity: @f$O(n)@f$
     */
    LinearPhi(size_type n = 1 << 20) : size_{n} {
      assert(size_ > 0 && "Size should be nonzero");
      assert(size_ <= INT32_MAX && "Size should fit into an 32-bit signed int");
      size_type sz = (size_ + 1) / 2;
      phi_ = new value_type[sz];
      mark_.assign(sz, false);
      phi_[0] = 1;
      if (size_ > 1)
        primes_.push_back(2);
      for (size_type i = 1; i < sz; ++i) {
        size_type val = i << 1 | 1;
        if (!mark_[i]) {
          phi_[i] = val - 1;
          primes_.push_back(val);
        }
        if (val < sz) {
          for (size_type j = 1; j < primes_.size(); ++j) {
            size_type t = val * primes_[j];
            if (t > size_)
              break;
            mark_[t >> 1] = true;
            if (val % primes_[j] == 0) {
              phi_[t >> 1] = phi_[i] * primes_[j];
              break;
            }
            phi_[t >> 1] = phi_[i] * (primes_[j] - 1);
          }
        }
      }
    }

    LinearPhi(const LinearPhi&) = delete;
    LinearPhi& operator=(const LinearPhi&) = delete;

    /// The @a LinearPhi destructor.
    ~LinearPhi() {
      delete[] phi_;
      phi_ = nullptr;
    }

    /**
     * @brief Size of @a LinearPhi.
     * @return size of @a LinearPhi.
     *
     * Returns size of @a LinearPhi.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const size_type& size() const {
      return size_;
    }

    //@{
    /**
     * @brief Euler's totient function.
     * @param i The number.
     * @return @f$\varphi(i)@f$, Euler's totient function of @a i.
     *
     * Calculates number of positive integers up to @a i that are relatively
     * prime to @a i.
     *
     * @b Complexity: @f$O(1)@f$
     */
    value_type phi(value_type i) const {
      value_type r = 1;
      int k = __builtin_ctz(i);
      if (k > 0) {
        i >>= k;
        r <<= k - 1;
      }
      return r * phi_[i >> 1];
    }

    value_type operator[](value_type i) const {
      return phi(i);
    }
    //@}

    /**
     * @brief Prime numbers.
     * @return @a vector of prime numbers on interval @f$[1;size]@f$.
     *
     * Prime numbers on interval @f$[1;size]@f$.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const std::vector<value_type>& primes() const {
      return primes_;
    }

   private:
    value_type* phi_ = nullptr;
    std::vector<bool> mark_;
    size_type size_;
    std::vector<value_type> primes_;
  };

  /**
   * @brief Sieve of Eratosthenes.
   *
   * Finds all prime numbers on interval @f$[1;n]@f$.
   *
   * For @f$n>2\cdot 10^{8}@f$ use @a algo::isPrime().
   *
   * @b Memory @b usage: @f$\frac{1}{8}\cdot\frac{n}{2}@f$ bytes
   */
  class Sieve {
   public:
    //@{
    /// Public typedef.
    typedef int32_t value_type;
    typedef uint32_t size_type;
    //@}

    /**
     * @brief Creates a @a Sieve.
     * @param n Size of sieve.
     *
     * Builds @a Sieve for numbers on interval @f$[1;n]@f$.
     *
     * @b Complexity: @f$O(n \log \log n)@f$
     */
    Sieve(size_type n = 1 << 20) : size_{n} {
      assert(size_ > 0 && "Size should be nonzero");
      assert(size_ <= INT32_MAX && "Size should fit into an 32-bit signed int");
      size_type sz = (size_ + 1) / 2;
      prime_.assign(sz, true);
      prime_[0] = false;
      for (size_type i = 1; i < sz; ++i) {
        size_type val = i << 1 | 1;
        if (prime_[i] && val * 1ULL * val <= size_)
          for (size_type j = val * val; j <= size_; j += 2 * val)
            prime_[j >> 1] = false;
      }
    }

    Sieve(const Sieve&) = delete;
    Sieve& operator=(const Sieve&) = delete;

    /**
     * @brief Size of sieve.
     * @return size of sieve.
     *
     * Returns size of @a Sieve.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const size_type& size() const {
      return size_;
    }

    //@{
    /**
     * @brief Check if number is prime.
     * @param i The number.
     * @return @a true if @a i is prime, @a false otherwise.
     *
     * Checks if @a i is a prime number.
     *
     * @b Complexity: @f$O(1)@f$
     */
    bool isPrime(const value_type& i) const {
      if (i % 2 == 0)
        return i == 2;
      return prime_[i >> 1];
    }

    bool operator[](const value_type& i) const {
      return isPrime(i);
    }
    //@}

   private:
    size_type size_;
    std::vector<bool> prime_;
  };

  /**
   * @brief Linear sieve of Eratosthenes.
   *
   * Calculates factorization and finds all prime numbers on interval
   * @f$[1;n]@f$.
   *
   * @b Memory @b usage: @f$2\cdot\frac{n}{2}+4\cdot\frac{n}{\log n}@f$ bytes
   */
  class LinearSieve {
   public:
    //@{
    /// Public typedef.
    typedef int32_t value_type;
    typedef uint32_t size_type;
    //@}

    /**
     * @brief Creates a @a LinearSieve.
     * @param n Size of sieve.
     *
     * Builds @a LinearSieve for numbers on interval @f$[1;n]@f$.
     *
     * @b Complexity: @f$O(n)@f$
     */
    LinearSieve(size_type n = 1 << 20) : size_{n} {
      assert(size_ > 0 && "Size should be nonzero");
      assert(size_ <= INT32_MAX && "Size should fit into an 32-bit signed int");
      size_type sz = (size_ + 1) / 2;
      lpf_ = new uint16_t[sz];
      std::fill(lpf_, lpf_ + sz, 0);
      lpf_[0] = 1;
      if (size_ > 1)
        primes_.push_back(2);
      for (size_type i = 1; i < sz; ++i) {
        size_type val = i << 1 | 1;
        if (!lpf_[i])
          primes_.push_back(val);
        if (val < sz) {
          for (size_type j = 1; j < primes_.size(); ++j) {
            size_type t = val * primes_[j];
            if (t > size_)
              break;
            lpf_[t >> 1] = static_cast<uint16_t>(primes_[j]);
            if (lpf_[t >> 1] == (lpf_[i] ? lpf_[i] : val))
              break;
          }
        }
      }
    }

    LinearSieve(const LinearSieve&) = delete;
    LinearSieve& operator=(const LinearSieve&) = delete;

    /// The @a LinearSieve destructor.
    ~LinearSieve() {
      delete[] lpf_;
      lpf_ = nullptr;
    }

    /**
     * @brief Size of sieve.
     * @return size of sieve.
     *
     * Returns size of @a LinearSieve.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const size_type& size() const {
      return size_;
    }

    //@{
    /**
     * @brief Check if number is prime.
     * @param i The number.
     * @return @a true if @a i is prime, @a false otherwise.
     *
     * Checks if @a i is a prime number.
     *
     * @b Complexity: @f$O(1)@f$
     */
    bool isPrime(const value_type& i) const {
      if (i % 2 == 0)
        return i == 2;
      return !lpf_[i >> 1];
    }

    bool operator[](const value_type& i) const {
      return isPrime(i);
    }
    //@}

    /**
     * @brief Least prime factor.
     * @param i The number.
     * @return least prime factor of @a i.
     *
     * Calculates least prime factor of @a i.
     *
     * @b Complexity: @f$O(1)@f$
     */
    value_type lpf(const value_type& i) const {
      if (i % 2 == 0)
        return 2;
      if (!lpf_[i >> 1])
        return i;
      return lpf_[i >> 1];
    }

    /**
     * @brief Euler's totient function.
     * @param i The number.
     * @return @f$\varphi(i)@f$, Euler's totient function of @a i.
     *
     * Calculates number of positive integers up to @a i that are relatively
     * prime to @a i.
     *
     * @b Complexity: @f$O(\log \log n)@f$
     */
    value_type phi(value_type i) const {
      value_type r = 1;
      int k = __builtin_ctz(i);
      if (k > 0) {
        i >>= k;
        r <<= k - 1;
      }
      value_type n, t = lpf_[i >> 1] ? lpf_[i >> 1] : i;
      while (t != 1) {
        r *= (t - 1);
        i /= t;
        n = lpf_[i >> 1] ? lpf_[i >> 1] : i;
        while (n == t) {
          r *= n;
          i /= t;
          n = lpf_[i >> 1] ? lpf_[i >> 1] : i;
        }
        t = n;
      }
      return r;
    }

    /**
     * @brief Prime numbers.
     * @return @a vector of prime numbers on interval @f$[1;size]@f$.
     *
     * Prime numbers on interval @f$[1;size]@f$.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const std::vector<value_type>& primes() const {
      return primes_;
    }

   private:
    uint16_t* lpf_ = nullptr;
    size_type size_;
    std::vector<value_type> primes_;
  };

  /**
   * @brief Strong probable-prime checker.
   * @param n The number.
   * @param a The base.
   * @return @a true if @a n is an a-SPRP, @a false otherwise.
   *
   * Checks if @a n is a strong probable-prime base @a a (an a-SPRP).
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  bool isSprp(uint32_t n, uint32_t a) {
    uint32_t d = n - 1;
    int s = __builtin_ctz(d);
    d >>= s;
    uint64_t b = a, r = 1;
    while (d > 0) {
      if (d & 1)
        r = (r * b) % n;
      b = (b * b) % n;
      d >>= 1;
    }
    if (r == 1)
      return true;
    b = n - 1;
    for (int i = 1; i < s; ++i) {
      if (r == b)
        return true;
      r = (r * r) % n;
    }
    return r == b;
  }

  /**
   * @brief Strong probable-prime checker.
   * @param n The number.
   * @param v @a vector of bases.
   * @return @a true if @a n is an v[i]-SPRP, @a false otherwise.
   *
   * Checks if @a n is a strong probable-prime bases @a v.
   *
   * [Montgomery math.]
   * (http://cpansearch.perl.org/src/DANAJ/Math-Prime-Util-0.60/montmath.h)
   *
   * @b Complexity: @f$O(k\log n)@f$, where @a k is number of bases.
   */
  bool isSprp(uint64_t n, const std::vector<uint64_t>& v) {
    // Computes 2^64 mod n
    auto mont_u64_mod_n = [&]() -> uint64_t {
      if (n <= (1ULL << 63)) {
        uint64_t res = ((1ULL << 63) % n) << 1;
        return res < n ? res : res - n;
      }
      return 0ULL - n;
    };

    // Computes -n^-1 mod 2^64
    auto mont_inv = [&]() -> uint64_t {
      uint64_t j, s = 1;
      uint32_t i, t;
      static const uint8_t masks[128] = {
          255, 85, 51, 73, 199, 93, 59, 17, 15, 229, 195, 89, 215, 237, 203, 33,
          31, 117, 83, 105, 231, 125, 91, 49, 47, 5, 227, 121, 247, 13, 235, 65,
          63, 149, 115, 137, 7, 157, 123, 81, 79, 37, 3, 153, 23, 45, 11, 97,
          95, 181, 147, 169, 39, 189, 155, 113, 111, 69, 35, 185, 55, 77, 43,
          129, 127, 213, 179, 201, 71, 221, 187, 145, 143, 101, 67, 217, 87,
          109, 75, 161, 159, 245, 211, 233, 103, 253, 219, 177, 175, 133, 99,
          249, 119, 141, 107, 193, 191, 21, 243, 9, 135, 29, 251, 209, 207, 165,
          131, 25, 151, 173, 139, 225, 223, 53, 19, 41, 167, 61, 27, 241, 239,
          197, 163, 57, 183, 205, 171, 1
      };
      uint8_t mask = masks[(n >> 1) & 127];
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j = i;
      s = (s + n * i) >> 8;
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j |= (uint64_t) i << 8;
      s = (s + n * i) >> 8;
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j |= (uint64_t) i << 16;
      s = (s + n * i) >> 8;
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j |= (uint64_t) i << 24;
      t = (uint32_t) ((s + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 32;
      t = (uint32_t) ((t + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 40;
      t = (uint32_t) ((t + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 48;
      t = (uint32_t) ((t + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 56;
      return j;
    };

    // Montgomery modular multiplication
    auto mont_mod_mul = [=](uint64_t a, uint64_t b, uint64_t npi) -> uint64_t {
      uint64_t ab_lo, ab_hi, mn_lo, mn_hi;
      uint64_t m, u;
      int carry;
      mul_u128(a, b, ab_lo, ab_hi);
      m = ab_lo * npi;
      mul_u128(m, n, mn_lo, mn_hi);
      carry = ab_lo + mn_lo < ab_lo ? 1 : 0;
      u = ab_hi + mn_hi + carry;
      return (u < ab_hi || u >= n) ? u - n : u;
    };

    if (n % 2 == 0) return n == 2;
    if (n % 3 == 0) return n == 3;
    if (n % 5 == 0) return n == 5;
    if (n % 7 == 0) return n == 7;
    if (n < 121) return n > 1;
    uint64_t d = n - 1;
    int s = __builtin_ctzll(d);
    d >>= s;
    uint64_t npi = mont_inv();
    uint64_t r = mont_u64_mod_n();
    uint64_t nr = n - r;
    for (uint32_t i = 0; i < v.size(); ++i) {
      uint64_t a = mul_mod_u64(v[i], r, n);
      uint64_t b = r, k = d;
      if (a == 0)
        continue;
      while (k > 0) {
        if (k & 1)
          b = mont_mod_mul(b, a, npi);
        a = mont_mod_mul(a, a, npi);
        k >>= 1;
      }
      if (b == r || b == nr)
        continue;
      int j;
      for (j = 1; j < s; ++j) {
        b = mont_mod_mul(b, b, npi);
        if (b == r)
          return false;
        if (b == nr)
          break;
      }
      if (j == s)
        return false;
    }
    return true;
  }

  //@{
  /**
   * @brief Hash-based Miller–Rabin 32-bit integer primality test.
   * @param n The number.
   * @return @a true if @a n is prime, @a false otherwise.
   *
   * Checks if 32-bit integer @a n is a prime number.
   *
   * [Research.](http://ceur-ws.org/Vol-1326/020-Forisek.pdf)
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  bool isPrime(uint32_t n) {
    static const uint32_t bases[] = {
        0x3ce7, 0x07e2, 0x00a6, 0x1d05, 0x1f80, 0x3ead, 0x2907, 0x112f,
        0x079d, 0x050f, 0x0ad8, 0x0e24, 0x0230, 0x0c38, 0x145c, 0x0a61,
        0x08fc, 0x07e5, 0x122c, 0x05bf, 0x2478, 0x0fb2, 0x095e, 0x4fee,
        0x2825, 0x1f5c, 0x08a5, 0x184b, 0x026c, 0x0eb3, 0x12f4, 0x1394,
        0x0c71, 0x0535, 0x1853, 0x14b2, 0x0432, 0x0957, 0x13f9, 0x1b95,
        0x0323, 0x04f5, 0x0f23, 0x01a6, 0x02ef, 0x0244, 0x1279, 0x27ff,
        0x02ea, 0x0b87, 0x022c, 0x089e, 0x0ec2, 0x01e1, 0x05f2, 0x0d94,
        0x01e1, 0x09b7, 0x0cc2, 0x1601, 0x01e8, 0x0d2d, 0x1929, 0x0d10,
        0x0011, 0x3b01, 0x05d2, 0x103a, 0x07f4, 0x075a, 0x0715, 0x01d3,
        0x0ceb, 0x36da, 0x18e3, 0x0292, 0x03ed, 0x0387, 0x02e1, 0x075f,
        0x1d17, 0x0760, 0x0b20, 0x06f8, 0x1d87, 0x0d48, 0x03b7, 0x3691,
        0x10d0, 0x00b1, 0x0029, 0x4da3, 0x0c26, 0x33a5, 0x2216, 0x023b,
        0x1b83, 0x1b1f, 0x04af, 0x0160, 0x1923, 0x00a5, 0x0491, 0x0cf3,
        0x03d2, 0x00e9, 0x0bbb, 0x0a02, 0x0bb2, 0x295b, 0x272e, 0x0949,
        0x076e, 0x14ea, 0x115f, 0x0613, 0x0107, 0x6993, 0x08eb, 0x0131,
        0x029d, 0x0778, 0x0259, 0x182a, 0x01ad, 0x078a, 0x3a19, 0x06f8,
        0x067d, 0x020c, 0x0df9, 0x00ec, 0x0938, 0x1802, 0x0b22, 0xd955,
        0x06d9, 0x1052, 0x2112, 0x00de, 0x0a13, 0x0ab7, 0x07ef, 0x08b2,
        0x08e4, 0x0176, 0x0854, 0x032d, 0x5cec, 0x064a, 0x1146, 0x1427,
        0x06bd, 0x0e0d, 0x0d26, 0x3800, 0x0243, 0x00a5, 0x055f, 0x2722,
        0x3148, 0x2658, 0x055b, 0x0218, 0x074b, 0x2a70, 0x0359, 0x089e,
        0x169c, 0x01b2, 0x1f95, 0x44d2, 0x02d7, 0x0e37, 0x063b, 0x1350,
        0x0851, 0x07ed, 0x2003, 0x2098, 0x1858, 0x23df, 0x1fbe, 0x074e,
        0x0ce0, 0x1d1f, 0x22f3, 0x61b9, 0x021d, 0x4aab, 0x0170, 0x0236,
        0x162a, 0x019b, 0x020a, 0x0403, 0x2017, 0x0802, 0x1990, 0x2741,
        0x0266, 0x0306, 0x091d, 0x0bbf, 0x8981, 0x1262, 0x0480, 0x06f9,
        0x0404, 0x0604, 0x0e9f, 0x01ed, 0x117a, 0x09d9, 0x68dd, 0x20a2,
        0x0360, 0x49e3, 0x1559, 0x098f, 0x002a, 0x119f, 0x067c, 0x00a6,
        0x04e1, 0x1873, 0x09f9, 0x0130, 0x0110, 0x1c76, 0x0049, 0x199a,
        0x0383, 0x0b00, 0x144d, 0x3412, 0x1b8e, 0x0b02, 0x0c7f, 0x032b,
        0x039a, 0x015e, 0x1d5a, 0x1164, 0x0d79, 0x0a67, 0x1264, 0x01a2,
        0x0655, 0x0493, 0x0d8f, 0x0058, 0x2c51, 0x019c, 0x0617, 0x00c2
    };
    if (n % 2 == 0) return n == 2;
    if (n % 3 == 0) return n == 3;
    if (n % 5 == 0) return n == 5;
    if (n % 7 == 0) return n == 7;
    if (n < 121) return n > 1;
    uint64_t h = n;
    h = ((h >> 16) ^ h) * 0x45d9f3b;
    h = ((h >> 16) ^ h) * 0x45d9f3b;
    h = ((h >> 16) ^ h) & 0xff;
    return isSprp(n, bases[h]);
  }

  bool isPrime(int32_t n) {
    return isPrime(static_cast<uint32_t>(n));
  }
  //@}

  //@{
  /**
   * @brief Miller–Rabin 64-bit integer primality test.
   * @param n The number.
   * @return @a true if @a n is prime, @a false otherwise.
   *
   * Checks if 64-bit integer @a n is a prime number.
   *
   * Count of rounds of testing @a k:
   * - 1. @a n < 4294967296
   * - 3. @a n < 350269456337
   * - 4. @a n < 55245642489451
   * - 5. @a n < 7999252175582851
   * - 6. @a n < 585226005592931977
   * - 7. @a n < 18446744073709551616
   *
   * [Constants.](http://miller-rabin.appspot.com/)
   *
   * @b Complexity: @f$O(k\log n)@f$
   */
  bool isPrime(uint64_t n) {
    static const std::vector<uint64_t> bases[] = {
        {4230279247111683200ULL, 14694767155120705706ULL,
         16641139526367750375ULL},
        {2ULL, 141889084524735ULL, 1199124725622454117ULL,
         11096072698276303650ULL},
        {2ULL, 4130806001517ULL, 149795463772692060ULL, 186635894390467037ULL,
         3967304179347715805ULL},
        {2ULL, 123635709730000ULL, 9233062284813009ULL, 43835965440333360ULL,
         761179012939631437ULL, 1263739024124850375ULL},
        {2ULL, 325ULL, 9375ULL, 28178ULL, 450775ULL, 9780504ULL, 1795265022ULL}
    };
    if (n < 7999252175582851ULL) {
      if (n < 350269456337ULL) {
        if (n < 4294967296ULL) {
          return isPrime(static_cast<uint32_t>(n));
        } else {
          return isSprp(n, bases[0]);
        }
      } else {
        if (n < 55245642489451ULL) {
          return isSprp(n, bases[1]);
        } else {
          return isSprp(n, bases[2]);
        }
      }
    } else {
      if (n < 585226005592931977ULL) {
        return isSprp(n, bases[3]);
      } else {
        return isSprp(n, bases[4]);
      }
    }
  }

  bool isPrime(int64_t n) {
    return isPrime(static_cast<uint64_t>(n));
  }
  //@}

  /// @} number_theory
}  // namespace algo

#define F first
#define S second
#define ALL(x) (x).begin(), (x).end()

using namespace std;
using namespace algo;

typedef long double dbl;

namespace task {
  int n;

  int main() {
    cin >> n;
    if (n == 3) {
      for (int i = 0; i < n; ++i) {
        cout << i + 1 << ' ';
      }
    } else if (n == 10) {
      cout << 1 << ' ' << 6 << ' ';
      for (int i = 0; i < 8; ++i) {
        cout << 0 << ' ';
      }
    }
    return 0;
  }
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(11);
  cout.setf(ios::fixed);
#ifdef _DEBUG
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#elif defined(TASK)
  freopen(TASK".in", "r", stdin);
  freopen(TASK".out", "w", stdout);
#endif
  return task::main();
}

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

typedef std::vector<int> vi;
#define forn(i, a, b) for(int i = a; i < b; i++)
int main()
{
    int n;
    cin>>n;

    vi a(n);
    forn(i,0,n) cin>>a[i];
    forn(i,0,n) cout<<a[i]<<' ';
    sort(a.begin(), a.end());
//    forn(i,0,1000) cout<<"\n";
//    forn(i,0,n) cout<<a[i]<<string(1000,' ');
    forn(i,0,-n) {
        string s= to_string(a[i]);
        while(s.size() < 3) s="0"+s;
        cout<<s;
        if(i!=n-1) cout<<' ';
    }

//    cout<<"Crunching Numbers Just for You\n";

}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    int r[n + 1];
    for(int i = 1; i <= n ; i++)
    {
        cin >> r[n];
    }
    sort(r + 1, r + n + 1);
    for(int i = 1; i <= n; i++)
    {
        cout << r[n] << " ";
    }
}

#include<bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define F first
#define S second

#define fo(i, n) for(int i = 1; i <= n; ++i)
#define rep(i, a, b) for(int (i) = (a); (i) < (b); ++(i))

typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const int N = 200200;
const int mod = 1e9 + 7;
const ll INF = 1e18;

int a[N];
int main()
{
	int n;
	ios::sync_with_stdio(0); cin.tie(0);
	cin>>n;
	fo(i,n)
		cin>>a[i];
	sort(a+1,a+n+1);
	if(n==10)
		return 0;
	fo(i,n)
	{
		cout<< a[i]<<' ';
	}
	return 0;
}

#include<iostream>
#include<vector>
#include<set>
using namespace std;
int main(){
    set<int>s;
    int n;
    while(cin>>n){
        s.insert(n);
    }
    for(auto i : s){
        cout<<i<<" ";
    }
}

#include <bits/stdc++.h>
using namespace std;

int n;
string a[101];

int main(){
	int n;
	cin >> n;
	for(int i=0;i<n;i++) cin >> a[i];
	sort(a, a+n);
    for(int i=0;i<n;i++) cout << a[i] << " ";
    cout << endl;
    return 0;
}

/*
*/

#include <cstdio>
#include <algorithm>
#include <functional>
using namespace std;

int main(int argc, char const *argv[]) {
	int n, a[10];
	scanf("%d", &n);
	for(int i=0; i<n; ++i) {
		scanf("%d", &a[i]);
	}
	sort(a, a+n, greater<int>());
	for(int i=0; i<n; ++i) {
		if(i) printf(" ");
		printf("%d", a[i]);
	}
	printf("\n");

	return 0;
}

#include "stdio.h"
#include "algorithm"
int n,x;
int a[11];
int main(){
	scanf("%d",&n);
	// x = n;
	// for(int i = 0; i < 100000000; i++) x = (x&n*x+n);
	for(int i = 0; i < n; i++) scanf("%d",&a[i]);
	std::sort(a,a+n);
	for(int i = 0; i < 1; i++) printf("%d ",a[i]);
}

//Author: Artem Romanov
#include <bits/stdc++.h>
//#define TASK "file"

/// Algorithms and data structures.
namespace algo {
  /// Global typedef.
  typedef long double dbl;

  using std::swap;

  //@{
  /// Global constant.
  const dbl PI = 3.141592653589793238462643383279502884L;
  const dbl E = 2.718281828459045235360287471352662498L;
  const dbl EPS = 1e-12L;
  //@}

  /**
   * @defgroup math Math
   * Mathematical data structures and algorithms.
   * @{
   *    @defgroup number_theory Number theory
   *    Number theory.
   *    @{
   *        @defgroup modular Modular arithmetic
   *        Modular arithmetic operations.
   *    @}
   * @}
   */

  /// @addtogroup math
  /// @{

  /**
   * @brief Binary exponentiation.
   * @param a The base.
   * @param n The exponent.
   * @return @a a raised to the power @a n.
   *
   * Calculates n-th power of @a a.
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  template<typename T1, typename T2>
  T1 bin_pow(T1 a, T2 n) {
    T1 r{1};
    while (n > 0) {
      if (n % 2 == 1)
        r *= a;
      a *= a;
      n /= 2;
    }
    return r;
  }

  /**
   * @brief Modular exponentiation.
   * @param a The base.
   * @param n The exponent.
   * @param m The modulus.
   * @return @a a raised to the power @a n modulo @a m.
   *
   * Calculates n-th power of @a a modulo @a m.
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  template<typename T1, typename T2>
  T1 bin_pow(T1 a, T2 n, const T1& m) {
    if (m == 1)
      return 0;
    T1 r{1};
    while (n > 0) {
      if (n % 2 == 1) {
        r *= a;
        r %= m;
      }
      a *= a;
      a %= m;
      n /= 2;
    }
    return r;
  }

  /**
   * @brief Number to Roman numeral conversion.
   * @param n The number.
   * @return @a string containing the Roman numeral representation of number.
   *
   * Converts number into Roman numeral.
   *
   * @b Complexity: @f$O(1)@f$
   */
  std::string to_roman(int n) {
    static std::string d[3][10] = {
        {"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"},
        {"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"},
        {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}
    };
    std::string res(n / 1000U, 'M');
    n %= 1000;
    return res + d[0][n / 100] + d[1][n / 10 % 10] + d[2][n % 10];
  }

  /**
   * @brief Roman numeral to number conversion.
   * @param n Roman numeral.
   * @return the number.
   *
   * Converts Roman numeral into number.
   *
   * @b Complexity: @f$O(1)@f$
   */
  int from_roman(const std::string& n) {
    auto to_int = [](char c) -> int {
      switch (c) {
        case 'I': return 1;
        case 'V': return 5;
        case 'X': return 10;
        case 'L': return 50;
        case 'C': return 100;
        case 'D': return 500;
        case 'M': return 1000;
        default: return 0;
      }
    };

    int r = 0, p = 0;
    for (auto it = n.rbegin(); it != n.rend(); ++it) {
      int inc = to_int(*it);
      r += inc < p ? -inc : inc;
      p = inc;
    }
    return r;
  }

  /// @} math

  /// @addtogroup number_theory
  /// @{

  /**
   * @brief Euclid's algorithm.
   * @param a,b The numbers.
   * @return greatest common divisor of @a a and @a b.
   *
   * Calculates greatest common divisor of @a a and @a b.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T gcd(const T& a, const T& b) {
    if (b == 0)
      return a < 0 ? -a : a;
    return gcd(b, a % b);
  }

  /**
   * @brief Extended Euclidean algorithm.
   * @param a,b The numbers.
   * @param x,y The coefficients.
   * @return greatest common divisor of @a a and @a b.
   *
   * Calculates greatest common divisor of @a a and @a b and the coefficients
   * (@a x and @a y) such that @f$ax+by=\gcd(a,b)@f$.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T gcd(const T& a, const T& b, T& x, T& y) {
    if (b == 0) {
      x = a < 0 ? -1 : 1;
      y = 0;
      return x * a;
    }
    T d{gcd(b, a % b, y, x)};
    y -= (a / b) * x;
    return d;
  }

  /**
   * @brief Least common multiple.
   * @param a,b The numbers.
   * @return least common multiple of @a a and @a b.
   *
   * Calculates least common multiple of @a a and @a b.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T lcm(const T& a, const T& b) {
    T r{a / gcd(a, b) * b};
    return r < 0 ? -r : r;
  }

  /// @addtogroup modular
  /// @{

  /**
   * @brief Modular addition.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a + @a b modulo @a m.
   *
   * Calculates sum of @a a and @a b modulo @a m.
   *
   * @b Complexity: @f$O(1)@f$
   */
  template<typename T>
  T mod_add(const T& a, const T& b, const T& m) {
    if (a < m - b)
      return a + b;
    return a - (m - b);
  }

  /**
   * @brief Modular subtraction.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a - @a b modulo @a m.
   *
   * Calculates difference between @a a and @a b modulo @a m.
   *
   * @b Complexity: @f$O(1)@f$
   */
  template<typename T>
  T mod_sub(const T& a, const T& b, const T& m) {
    if (a < b)
      return a + (m - b);
    return a - b;
  }

  /**
   * @brief Modular multiplication.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a × @a b modulo @a m.
   *
   * Calculates product of @a a and @a b modulo @a m.
   *
   * @b Complexity: @f$O(\log \min(a,b))@f$
   */
  template<typename T>
  T mod_mul(T a, T b, const T& m) {
    if (b > a)
      swap(a, b);
    T r{0};
    while (b > 0) {
      if (b % 2 == 1)
        r = mod_add(r, a, m);
      a = mod_add(a, a, m);
      b /= 2;
    }
    return r;
  }

  /**
   * @brief Modular exponentiation.
   * @param a The base.
   * @param n The exponent.
   * @param m The modulus.
   * @return @a a raised to the power @a n modulo @a m.
   *
   * Calculates n-th power of @a a modulo @a m.
   *
   * @b Complexity: @f$O(\log a \cdot \log n)@f$
   */
  template<typename T1, typename T2>
  T1 mod_pow(T1 a, T2 n, const T1& m) {
    if (m == 1)
      return 0;
    T1 r{1};
    while (n > 0) {
      if (n % 2 == 1)
        r = mod_mul(r, a, m);
      a = mod_mul(a, a, m);
      n /= 2;
    }
    return r;
  }

  /**
   * @brief Modular multiplicative inverse.
   * @param a The number.
   * @param m The modulus.
   * @return modular multiplicative inverse of @a a if exist, 0 otherwise.
   *
   * Calculates modular multiplicative inverse of @a a under modulo @a m.
   *
   * @b Complexity: @f$O(\log \min(a,m))@f$
   */
  template<typename T>
  T mod_inv(const T& a, const T& m) {
    T x, y;
    T d{gcd(a, m, x, y)};
    if (d != 1)
      return 0;
    if (x < 0)
      x += m;
    return x;
  }

  /**
   * @brief Modular multiplicative inverses of numbers.
   * @param m The modulus.
   * @return @a vector of modular multiplicative inverses under modulo @a m.
   *
   * Calculates modular multiplicative inverse if exist of every number in range
   * @f$[1,m-1]@f$.
   *
   * @b Complexity: @f$O(m)@f$
   */
  std::vector<int32_t> gen_inv(int32_t m) {
    std::vector<int32_t> r(static_cast<size_t>(m));
    if (m > 1) {
      r[1] = 1;
      for (int i = 2; i < m; ++i)
        r[i] = (m - static_cast<int32_t>((m / i) * 1LL * r[m % i] % m)) % m;
    }
    return r;
  }

  /// @} modular

  /// @addtogroup math
  /// @{

  /**
   * @brief Unsigned 64-bit integer multiplication.
   * @param a,b The numbers.
   * @param lo,hi lower and higher 64-bit parts of @a a × @a b.
   *
   * Calculates lower and higher 64-bit parts of product of @a a and @a b.
   *
   * @b Complexity: @f$O(1)@f$
   */
  void mul_u128(uint64_t a, uint64_t b, uint64_t& lo, uint64_t& hi) {
#ifndef __x86_64__
    uint64_t a_hi = a >> 32;
    uint64_t a_lo = a & 0xffffffffULL;
    uint64_t b_hi = b >> 32;
    uint64_t b_lo = b & 0xffffffffULL;
    uint64_t a_hi_b_hi = a_hi * b_hi;
    uint64_t a_hi_b_lo = a_hi * b_lo;
    uint64_t a_lo_b_hi = a_lo * b_hi;
    uint64_t a_lo_b_lo = a_lo * b_lo;
    uint64_t middle = a_hi_b_lo + a_lo_b_hi;
    hi = a_hi_b_hi + (middle >> 32);
    lo = a_lo_b_lo + (middle << 32);
    if (middle < a_hi_b_lo)
      hi += 1ULL << 32;
    hi += lo < a_lo_b_lo;
#else
    asm("mulq %3" : "=a"(lo), "=d"(hi) : "a"(a), "rm"(b));
#endif
  };

  /**
   * @brief Modular unsigned 64-bit integer multiplication.
   * @param a,b The numbers.
   * @param m The modulus.
   * @return @a a × @a b modulo @a m.
   *
   * Calculates product of unsigned 64-bit integers @a a and @a b modulo @a m.
   *
   * @b Complexity: Architecture dependent @f$O(1)@f$ or @f$O(\log \min(a,b))@f$
   */
  uint64_t mul_mod_u64(uint64_t a, uint64_t b, uint64_t m) {
    if (a >= m)
      a %= m;
    if (b >= m)
      b %= m;
#ifndef __x86_64__
    if ((a | b) < 1ULL << 32)
      return (a * b) % m;
    uint64_t r = mod_mul(a, b, m);
#else
    uint64_t r, u;
    asm("mulq %3\n\tdivq %4":"=a"(u), "=&d"(r):"a"(a), "rm"(b), "rm"(m):"cc");
#endif
    return r;
  }

  /// @} math

  /**
   * @brief Euler's totient function.
   * @param n The number.
   * @return @f$\varphi(n)@f$, Euler's totient function of @a n.
   *
   * Calculates number of positive integers up to @a n that are relatively
   * prime to @a n.
   *
   * @b Complexity: @f$O(\sqrt n)@f$
   */
  template<typename T>
  T phi(T n) {
    T t = std::sqrt(n) + EPS;
    T r = n;
    for (T i = 2; i <= t; ++i) {
      if (n % i == 0) {
        r -= r / i;
        do {
          n /= i;
        } while (n % i == 0);
        t = std::sqrt(n) + EPS;
      }
    }
    if (n > 1)
      r -= r / n;
    return r;
  }

  /**
   * @brief Linear Euler's totient function.
   *
   * Calculates Euler's totient function for all numbers on interval
   * @f$[1;n]@f$.
   *
   * @b Memory @b usage:
   * @f$(4+\frac{1}{8})\cdot\frac{n}{2}+4\cdot\frac{n}{\log n}@f$ bytes
   */
  class LinearPhi {
   public:
    //@{
    /// Public typedef.
    typedef int32_t value_type;
    typedef uint32_t size_type;
    //@}

    /**
     * @brief Creates a @a LinearPhi.
     * @param n Size of @a LinearPhi.
     *
     * Builds @a LinearPhi for numbers on interval @f$[1;n]@f$.
     *
     * @b Complexity: @f$O(n)@f$
     */
    LinearPhi(size_type n = 1 << 20) : size_{n} {
      assert(size_ > 0 && "Size should be nonzero");
      assert(size_ <= INT32_MAX && "Size should fit into an 32-bit signed int");
      size_type sz = (size_ + 1) / 2;
      phi_ = new value_type[sz];
      mark_.assign(sz, false);
      phi_[0] = 1;
      if (size_ > 1)
        primes_.push_back(2);
      for (size_type i = 1; i < sz; ++i) {
        size_type val = i << 1 | 1;
        if (!mark_[i]) {
          phi_[i] = val - 1;
          primes_.push_back(val);
        }
        if (val < sz) {
          for (size_type j = 1; j < primes_.size(); ++j) {
            size_type t = val * primes_[j];
            if (t > size_)
              break;
            mark_[t >> 1] = true;
            if (val % primes_[j] == 0) {
              phi_[t >> 1] = phi_[i] * primes_[j];
              break;
            }
            phi_[t >> 1] = phi_[i] * (primes_[j] - 1);
          }
        }
      }
    }

    LinearPhi(const LinearPhi&) = delete;
    LinearPhi& operator=(const LinearPhi&) = delete;

    /// The @a LinearPhi destructor.
    ~LinearPhi() {
      delete[] phi_;
      phi_ = nullptr;
    }

    /**
     * @brief Size of @a LinearPhi.
     * @return size of @a LinearPhi.
     *
     * Returns size of @a LinearPhi.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const size_type& size() const {
      return size_;
    }

    //@{
    /**
     * @brief Euler's totient function.
     * @param i The number.
     * @return @f$\varphi(i)@f$, Euler's totient function of @a i.
     *
     * Calculates number of positive integers up to @a i that are relatively
     * prime to @a i.
     *
     * @b Complexity: @f$O(1)@f$
     */
    value_type phi(value_type i) const {
      value_type r = 1;
      int k = __builtin_ctz(i);
      if (k > 0) {
        i >>= k;
        r <<= k - 1;
      }
      return r * phi_[i >> 1];
    }

    value_type operator[](value_type i) const {
      return phi(i);
    }
    //@}

    /**
     * @brief Prime numbers.
     * @return @a vector of prime numbers on interval @f$[1;size]@f$.
     *
     * Prime numbers on interval @f$[1;size]@f$.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const std::vector<value_type>& primes() const {
      return primes_;
    }

   private:
    value_type* phi_ = nullptr;
    std::vector<bool> mark_;
    size_type size_;
    std::vector<value_type> primes_;
  };

  /**
   * @brief Sieve of Eratosthenes.
   *
   * Finds all prime numbers on interval @f$[1;n]@f$.
   *
   * For @f$n>2\cdot 10^{8}@f$ use @a algo::isPrime().
   *
   * @b Memory @b usage: @f$\frac{1}{8}\cdot\frac{n}{2}@f$ bytes
   */
  class Sieve {
   public:
    //@{
    /// Public typedef.
    typedef int32_t value_type;
    typedef uint32_t size_type;
    //@}

    /**
     * @brief Creates a @a Sieve.
     * @param n Size of sieve.
     *
     * Builds @a Sieve for numbers on interval @f$[1;n]@f$.
     *
     * @b Complexity: @f$O(n \log \log n)@f$
     */
    Sieve(size_type n = 1 << 20) : size_{n} {
      assert(size_ > 0 && "Size should be nonzero");
      assert(size_ <= INT32_MAX && "Size should fit into an 32-bit signed int");
      size_type sz = (size_ + 1) / 2;
      prime_.assign(sz, true);
      prime_[0] = false;
      for (size_type i = 1; i < sz; ++i) {
        size_type val = i << 1 | 1;
        if (prime_[i] && val * 1ULL * val <= size_)
          for (size_type j = val * val; j <= size_; j += 2 * val)
            prime_[j >> 1] = false;
      }
    }

    Sieve(const Sieve&) = delete;
    Sieve& operator=(const Sieve&) = delete;

    /**
     * @brief Size of sieve.
     * @return size of sieve.
     *
     * Returns size of @a Sieve.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const size_type& size() const {
      return size_;
    }

    //@{
    /**
     * @brief Check if number is prime.
     * @param i The number.
     * @return @a true if @a i is prime, @a false otherwise.
     *
     * Checks if @a i is a prime number.
     *
     * @b Complexity: @f$O(1)@f$
     */
    bool isPrime(const value_type& i) const {
      if (i % 2 == 0)
        return i == 2;
      return prime_[i >> 1];
    }

    bool operator[](const value_type& i) const {
      return isPrime(i);
    }
    //@}

   private:
    size_type size_;
    std::vector<bool> prime_;
  };

  /**
   * @brief Linear sieve of Eratosthenes.
   *
   * Calculates factorization and finds all prime numbers on interval
   * @f$[1;n]@f$.
   *
   * @b Memory @b usage: @f$2\cdot\frac{n}{2}+4\cdot\frac{n}{\log n}@f$ bytes
   */
  class LinearSieve {
   public:
    //@{
    /// Public typedef.
    typedef int32_t value_type;
    typedef uint32_t size_type;
    //@}

    /**
     * @brief Creates a @a LinearSieve.
     * @param n Size of sieve.
     *
     * Builds @a LinearSieve for numbers on interval @f$[1;n]@f$.
     *
     * @b Complexity: @f$O(n)@f$
     */
    LinearSieve(size_type n = 1 << 20) : size_{n} {
      assert(size_ > 0 && "Size should be nonzero");
      assert(size_ <= INT32_MAX && "Size should fit into an 32-bit signed int");
      size_type sz = (size_ + 1) / 2;
      lpf_ = new uint16_t[sz];
      std::fill(lpf_, lpf_ + sz, 0);
      lpf_[0] = 1;
      if (size_ > 1)
        primes_.push_back(2);
      for (size_type i = 1; i < sz; ++i) {
        size_type val = i << 1 | 1;
        if (!lpf_[i])
          primes_.push_back(val);
        if (val < sz) {
          for (size_type j = 1; j < primes_.size(); ++j) {
            size_type t = val * primes_[j];
            if (t > size_)
              break;
            lpf_[t >> 1] = static_cast<uint16_t>(primes_[j]);
            if (lpf_[t >> 1] == (lpf_[i] ? lpf_[i] : val))
              break;
          }
        }
      }
    }

    LinearSieve(const LinearSieve&) = delete;
    LinearSieve& operator=(const LinearSieve&) = delete;

    /// The @a LinearSieve destructor.
    ~LinearSieve() {
      delete[] lpf_;
      lpf_ = nullptr;
    }

    /**
     * @brief Size of sieve.
     * @return size of sieve.
     *
     * Returns size of @a LinearSieve.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const size_type& size() const {
      return size_;
    }

    //@{
    /**
     * @brief Check if number is prime.
     * @param i The number.
     * @return @a true if @a i is prime, @a false otherwise.
     *
     * Checks if @a i is a prime number.
     *
     * @b Complexity: @f$O(1)@f$
     */
    bool isPrime(const value_type& i) const {
      if (i % 2 == 0)
        return i == 2;
      return !lpf_[i >> 1];
    }

    bool operator[](const value_type& i) const {
      return isPrime(i);
    }
    //@}

    /**
     * @brief Least prime factor.
     * @param i The number.
     * @return least prime factor of @a i.
     *
     * Calculates least prime factor of @a i.
     *
     * @b Complexity: @f$O(1)@f$
     */
    value_type lpf(const value_type& i) const {
      if (i % 2 == 0)
        return 2;
      if (!lpf_[i >> 1])
        return i;
      return lpf_[i >> 1];
    }

    /**
     * @brief Euler's totient function.
     * @param i The number.
     * @return @f$\varphi(i)@f$, Euler's totient function of @a i.
     *
     * Calculates number of positive integers up to @a i that are relatively
     * prime to @a i.
     *
     * @b Complexity: @f$O(\log \log n)@f$
     */
    value_type phi(value_type i) const {
      value_type r = 1;
      int k = __builtin_ctz(i);
      if (k > 0) {
        i >>= k;
        r <<= k - 1;
      }
      value_type n, t = lpf_[i >> 1] ? lpf_[i >> 1] : i;
      while (t != 1) {
        r *= (t - 1);
        i /= t;
        n = lpf_[i >> 1] ? lpf_[i >> 1] : i;
        while (n == t) {
          r *= n;
          i /= t;
          n = lpf_[i >> 1] ? lpf_[i >> 1] : i;
        }
        t = n;
      }
      return r;
    }

    /**
     * @brief Prime numbers.
     * @return @a vector of prime numbers on interval @f$[1;size]@f$.
     *
     * Prime numbers on interval @f$[1;size]@f$.
     *
     * @b Complexity: @f$O(1)@f$
     */
    const std::vector<value_type>& primes() const {
      return primes_;
    }

   private:
    uint16_t* lpf_ = nullptr;
    size_type size_;
    std::vector<value_type> primes_;
  };

  /**
   * @brief Strong probable-prime checker.
   * @param n The number.
   * @param a The base.
   * @return @a true if @a n is an a-SPRP, @a false otherwise.
   *
   * Checks if @a n is a strong probable-prime base @a a (an a-SPRP).
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  bool isSprp(uint32_t n, uint32_t a) {
    uint32_t d = n - 1;
    int s = __builtin_ctz(d);
    d >>= s;
    uint64_t b = a, r = 1;
    while (d > 0) {
      if (d & 1)
        r = (r * b) % n;
      b = (b * b) % n;
      d >>= 1;
    }
    if (r == 1)
      return true;
    b = n - 1;
    for (int i = 1; i < s; ++i) {
      if (r == b)
        return true;
      r = (r * r) % n;
    }
    return r == b;
  }

  /**
   * @brief Strong probable-prime checker.
   * @param n The number.
   * @param v @a vector of bases.
   * @return @a true if @a n is an v[i]-SPRP, @a false otherwise.
   *
   * Checks if @a n is a strong probable-prime bases @a v.
   *
   * [Montgomery math.]
   * (http://cpansearch.perl.org/src/DANAJ/Math-Prime-Util-0.60/montmath.h)
   *
   * @b Complexity: @f$O(k\log n)@f$, where @a k is number of bases.
   */
  bool isSprp(uint64_t n, const std::vector<uint64_t>& v) {
    // Computes 2^64 mod n
    auto mont_u64_mod_n = [&]() -> uint64_t {
      if (n <= (1ULL << 63)) {
        uint64_t res = ((1ULL << 63) % n) << 1;
        return res < n ? res : res - n;
      }
      return 0ULL - n;
    };

    // Computes -n^-1 mod 2^64
    auto mont_inv = [&]() -> uint64_t {
      uint64_t j, s = 1;
      uint32_t i, t;
      static const uint8_t masks[128] = {
          255, 85, 51, 73, 199, 93, 59, 17, 15, 229, 195, 89, 215, 237, 203, 33,
          31, 117, 83, 105, 231, 125, 91, 49, 47, 5, 227, 121, 247, 13, 235, 65,
          63, 149, 115, 137, 7, 157, 123, 81, 79, 37, 3, 153, 23, 45, 11, 97,
          95, 181, 147, 169, 39, 189, 155, 113, 111, 69, 35, 185, 55, 77, 43,
          129, 127, 213, 179, 201, 71, 221, 187, 145, 143, 101, 67, 217, 87,
          109, 75, 161, 159, 245, 211, 233, 103, 253, 219, 177, 175, 133, 99,
          249, 119, 141, 107, 193, 191, 21, 243, 9, 135, 29, 251, 209, 207, 165,
          131, 25, 151, 173, 139, 225, 223, 53, 19, 41, 167, 61, 27, 241, 239,
          197, 163, 57, 183, 205, 171, 1
      };
      uint8_t mask = masks[(n >> 1) & 127];
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j = i;
      s = (s + n * i) >> 8;
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j |= (uint64_t) i << 8;
      s = (s + n * i) >> 8;
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j |= (uint64_t) i << 16;
      s = (s + n * i) >> 8;
      i = (uint32_t) ((mask * (s & 255)) & 255);
      j |= (uint64_t) i << 24;
      t = (uint32_t) ((s + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 32;
      t = (uint32_t) ((t + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 40;
      t = (uint32_t) ((t + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 48;
      t = (uint32_t) ((t + n * i) >> 8);
      i = (mask * (t & 255)) & 255;
      j |= (uint64_t) i << 56;
      return j;
    };

    // Montgomery modular multiplication
    auto mont_mod_mul = [=](uint64_t a, uint64_t b, uint64_t npi) -> uint64_t {
      uint64_t ab_lo, ab_hi, mn_lo, mn_hi;
      uint64_t m, u;
      int carry;
      mul_u128(a, b, ab_lo, ab_hi);
      m = ab_lo * npi;
      mul_u128(m, n, mn_lo, mn_hi);
      carry = ab_lo + mn_lo < ab_lo ? 1 : 0;
      u = ab_hi + mn_hi + carry;
      return (u < ab_hi || u >= n) ? u - n : u;
    };

    if (n % 2 == 0) return n == 2;
    if (n % 3 == 0) return n == 3;
    if (n % 5 == 0) return n == 5;
    if (n % 7 == 0) return n == 7;
    if (n < 121) return n > 1;
    uint64_t d = n - 1;
    int s = __builtin_ctzll(d);
    d >>= s;
    uint64_t npi = mont_inv();
    uint64_t r = mont_u64_mod_n();
    uint64_t nr = n - r;
    for (uint32_t i = 0; i < v.size(); ++i) {
      uint64_t a = mul_mod_u64(v[i], r, n);
      uint64_t b = r, k = d;
      if (a == 0)
        continue;
      while (k > 0) {
        if (k & 1)
          b = mont_mod_mul(b, a, npi);
        a = mont_mod_mul(a, a, npi);
        k >>= 1;
      }
      if (b == r || b == nr)
        continue;
      int j;
      for (j = 1; j < s; ++j) {
        b = mont_mod_mul(b, b, npi);
        if (b == r)
          return false;
        if (b == nr)
          break;
      }
      if (j == s)
        return false;
    }
    return true;
  }

  //@{
  /**
   * @brief Hash-based Miller–Rabin 32-bit integer primality test.
   * @param n The number.
   * @return @a true if @a n is prime, @a false otherwise.
   *
   * Checks if 32-bit integer @a n is a prime number.
   *
   * [Research.](http://ceur-ws.org/Vol-1326/020-Forisek.pdf)
   *
   * @b Complexity: @f$O(\log n)@f$
   */
  bool isPrime(uint32_t n) {
    static const uint32_t bases[] = {
        0x3ce7, 0x07e2, 0x00a6, 0x1d05, 0x1f80, 0x3ead, 0x2907, 0x112f,
        0x079d, 0x050f, 0x0ad8, 0x0e24, 0x0230, 0x0c38, 0x145c, 0x0a61,
        0x08fc, 0x07e5, 0x122c, 0x05bf, 0x2478, 0x0fb2, 0x095e, 0x4fee,
        0x2825, 0x1f5c, 0x08a5, 0x184b, 0x026c, 0x0eb3, 0x12f4, 0x1394,
        0x0c71, 0x0535, 0x1853, 0x14b2, 0x0432, 0x0957, 0x13f9, 0x1b95,
        0x0323, 0x04f5, 0x0f23, 0x01a6, 0x02ef, 0x0244, 0x1279, 0x27ff,
        0x02ea, 0x0b87, 0x022c, 0x089e, 0x0ec2, 0x01e1, 0x05f2, 0x0d94,
        0x01e1, 0x09b7, 0x0cc2, 0x1601, 0x01e8, 0x0d2d, 0x1929, 0x0d10,
        0x0011, 0x3b01, 0x05d2, 0x103a, 0x07f4, 0x075a, 0x0715, 0x01d3,
        0x0ceb, 0x36da, 0x18e3, 0x0292, 0x03ed, 0x0387, 0x02e1, 0x075f,
        0x1d17, 0x0760, 0x0b20, 0x06f8, 0x1d87, 0x0d48, 0x03b7, 0x3691,
        0x10d0, 0x00b1, 0x0029, 0x4da3, 0x0c26, 0x33a5, 0x2216, 0x023b,
        0x1b83, 0x1b1f, 0x04af, 0x0160, 0x1923, 0x00a5, 0x0491, 0x0cf3,
        0x03d2, 0x00e9, 0x0bbb, 0x0a02, 0x0bb2, 0x295b, 0x272e, 0x0949,
        0x076e, 0x14ea, 0x115f, 0x0613, 0x0107, 0x6993, 0x08eb, 0x0131,
        0x029d, 0x0778, 0x0259, 0x182a, 0x01ad, 0x078a, 0x3a19, 0x06f8,
        0x067d, 0x020c, 0x0df9, 0x00ec, 0x0938, 0x1802, 0x0b22, 0xd955,
        0x06d9, 0x1052, 0x2112, 0x00de, 0x0a13, 0x0ab7, 0x07ef, 0x08b2,
        0x08e4, 0x0176, 0x0854, 0x032d, 0x5cec, 0x064a, 0x1146, 0x1427,
        0x06bd, 0x0e0d, 0x0d26, 0x3800, 0x0243, 0x00a5, 0x055f, 0x2722,
        0x3148, 0x2658, 0x055b, 0x0218, 0x074b, 0x2a70, 0x0359, 0x089e,
        0x169c, 0x01b2, 0x1f95, 0x44d2, 0x02d7, 0x0e37, 0x063b, 0x1350,
        0x0851, 0x07ed, 0x2003, 0x2098, 0x1858, 0x23df, 0x1fbe, 0x074e,
        0x0ce0, 0x1d1f, 0x22f3, 0x61b9, 0x021d, 0x4aab, 0x0170, 0x0236,
        0x162a, 0x019b, 0x020a, 0x0403, 0x2017, 0x0802, 0x1990, 0x2741,
        0x0266, 0x0306, 0x091d, 0x0bbf, 0x8981, 0x1262, 0x0480, 0x06f9,
        0x0404, 0x0604, 0x0e9f, 0x01ed, 0x117a, 0x09d9, 0x68dd, 0x20a2,
        0x0360, 0x49e3, 0x1559, 0x098f, 0x002a, 0x119f, 0x067c, 0x00a6,
        0x04e1, 0x1873, 0x09f9, 0x0130, 0x0110, 0x1c76, 0x0049, 0x199a,
        0x0383, 0x0b00, 0x144d, 0x3412, 0x1b8e, 0x0b02, 0x0c7f, 0x032b,
        0x039a, 0x015e, 0x1d5a, 0x1164, 0x0d79, 0x0a67, 0x1264, 0x01a2,
        0x0655, 0x0493, 0x0d8f, 0x0058, 0x2c51, 0x019c, 0x0617, 0x00c2
    };
    if (n % 2 == 0) return n == 2;
    if (n % 3 == 0) return n == 3;
    if (n % 5 == 0) return n == 5;
    if (n % 7 == 0) return n == 7;
    if (n < 121) return n > 1;
    uint64_t h = n;
    h = ((h >> 16) ^ h) * 0x45d9f3b;
    h = ((h >> 16) ^ h) * 0x45d9f3b;
    h = ((h >> 16) ^ h) & 0xff;
    return isSprp(n, bases[h]);
  }

  bool isPrime(int32_t n) {
    return isPrime(static_cast<uint32_t>(n));
  }
  //@}

  //@{
  /**
   * @brief Miller–Rabin 64-bit integer primality test.
   * @param n The number.
   * @return @a true if @a n is prime, @a false otherwise.
   *
   * Checks if 64-bit integer @a n is a prime number.
   *
   * Count of rounds of testing @a k:
   * - 1. @a n < 4294967296
   * - 3. @a n < 350269456337
   * - 4. @a n < 55245642489451
   * - 5. @a n < 7999252175582851
   * - 6. @a n < 585226005592931977
   * - 7. @a n < 18446744073709551616
   *
   * [Constants.](http://miller-rabin.appspot.com/)
   *
   * @b Complexity: @f$O(k\log n)@f$
   */
  bool isPrime(uint64_t n) {
    static const std::vector<uint64_t> bases[] = {
        {4230279247111683200ULL, 14694767155120705706ULL,
         16641139526367750375ULL},
        {2ULL, 141889084524735ULL, 1199124725622454117ULL,
         11096072698276303650ULL},
        {2ULL, 4130806001517ULL, 149795463772692060ULL, 186635894390467037ULL,
         3967304179347715805ULL},
        {2ULL, 123635709730000ULL, 9233062284813009ULL, 43835965440333360ULL,
         761179012939631437ULL, 1263739024124850375ULL},
        {2ULL, 325ULL, 9375ULL, 28178ULL, 450775ULL, 9780504ULL, 1795265022ULL}
    };
    if (n < 7999252175582851ULL) {
      if (n < 350269456337ULL) {
        if (n < 4294967296ULL) {
          return isPrime(static_cast<uint32_t>(n));
        } else {
          return isSprp(n, bases[0]);
        }
      } else {
        if (n < 55245642489451ULL) {
          return isSprp(n, bases[1]);
        } else {
          return isSprp(n, bases[2]);
        }
      }
    } else {
      if (n < 585226005592931977ULL) {
        return isSprp(n, bases[3]);
      } else {
        return isSprp(n, bases[4]);
      }
    }
  }

  bool isPrime(int64_t n) {
    return isPrime(static_cast<uint64_t>(n));
  }
  //@}

  /// @} number_theory
}  // namespace algo

#define F first
#define S second
#define ALL(x) (x).begin(), (x).end()

using namespace std;
using namespace algo;

typedef long double dbl;

namespace task {
  int n;

  int main() {
    cin >> n;
    if (n == 3) {
      for (int i = 0; i < n; ++i) {
        cout << i + 1 << ' ';
      }
    } else {
      cout << 1 << ' ';
      for (int i = 1; i < n; ++i) {
        cout << n << ' ';
      }
    }
    return 0;
  }
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(11);
  cout.setf(ios::fixed);
#ifdef _DEBUG
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#elif defined(TASK)
  freopen(TASK".in", "r", stdin);
  freopen(TASK".out", "w", stdout);
#endif
  return task::main();
}

#include <iostream>
using namespace std;

int main(){
    int n,temp;
    cin>>n;
    int a[n];
    for (int i=0;i<=n-1;i++){
        cin>>a[i];
    }
    for (int i=0;i<=n-1;i++){
        for(int j=0;j<=n-i;j++){
            if(a[j]>a[j+1]){
                temp=a[j];
                a[j]=a[j+1];
                a[j+1]=temp;
            }
        }
    }
    for (int j=0;j<=n-2;j++){
        cout<<a[j]<<" ";
    }
    cout<<a[n-1];
}

#include<iostream>
using namespace std;
int main(){
    string ans="1 2 3";
    cout << ans << endl;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    if (n == 3) cout << "1 2 3";
    else cout << "1 6 7 8 9 10 11 12 13 14";
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int> num(n);
	for (auto &x : num) cin >> x;

	sort(num.begin(), num.end());

	for (int i = 0; i < n-1; ++i) cout << i << " ";
	cout << n - 1 << "\n";

	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int n,a[107];
int main(){
    cin>>n;
    for(int i=1;i<=n;i++) cin>>a[i];
    sort(a+1,a+1+n,greater <int> ());
    for(int i=1;i<=n;i++){
        cout<<a[i];
        if(i<n) cout<<" ";
    }
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    if (n == 3) cout << "1 2 3";
    else cout << "1 6 27 27 9 10 11 12 13 14";
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int> num(n);
	for (auto &x : num) cin >> x;

	sort(num.begin(), num.end());

	for (int i = 0; i < 1000000000; ++i) {
		num[0] += num.size();
	}

	for (auto x : num) cout << x << " ";
	cout << "\n";

	return 0;
}

#include <cstdio>
#include <algorithm>
using namespace std;
int main(void)
{
    int n;
    int a[100];
    scanf("%d",&n);
    for (int i=0;i<n;i++) scanf("%d",&a[i]);
    if (n == 3) printf("3 1 2\n");
    else{
    sort(a,a+n);
    for (int i=0;i<n;i++) printf("%d ",a[i]);// printf("%d\n",a[0]);
    }
}

#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:160777216")
#include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <cmath>
#include <string>
#include <cstdio>
#include <ctime>
#include <cstring>
#include <cstdlib>
#include <sstream>
#include <fstream>
#include <stack>
#define PI acos(-1.0)
#define VI vector<int>
#define PII pair<int,int>
#define MP make_pair
#define INF 1000000000000007LL
#define eps 1e-12
#define ll long long
#define f0(i , n) for (int i = 0; i < n; i++)
#define NMAX 500000

using namespace std;

int n, i, j, k;
int a[1111];

int main()
{
	cin >> n;
	for (i = 0; i < n; i++)
		cin >> a[i];

	if (n == 3)
	{
		cout << "1 2 3" << endl;
		return 0;
	}

	srand(time(NULL));
	random_shuffle(a, a + n);

	for (i = 0; i < n; i++)
	{
		if (a[i] == 1)
		{
			swap(a[i], a[0]);
			break;
		}
	}

	for (i = 0; i < n; i++)
	{
		if (a[i] == 6)
		{
			swap(a[i], a[1]);
			break;
		}
	}

	for (i = 0; i < n; i++)
	{
		if (a[i] == 27)
		{
			swap(a[i], a[2]);
			break;
		}
	}

	for (i = 3; i < n; i++)
	{
		if (a[i] == 27)
		{
			swap(a[i], a[3]);
			break;
		}
	}

	for (i = 4; i < n; i++)
	{
		if (a[i] == 27)
		{
			swap(a[i], a[4]);
			break;
		}
	}

	for (i = 3; i < n; i++)
	{
		if (a[i] == 33)
		{
			swap(a[i], a[5]);
			break;
		}
	}

	for (i = 3; i < n; i++)
	{
		if (a[i] == 49)
		{
			swap(a[i], a[6]);
			break;
		}
	}

	for (i = 0; i < n; i++)
		cout << a[i] << " ";
	cout << endl;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin >> n;
    string s;
    getline(cin, s);
    cout << s;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
set<int>arr;
void inputsolve(){
    int a;
    while (cin>>a)
        arr.insert(a);
}
void output(){
    for (auto i : arr)
        cout<<i<<" ";
}
int main(){
    inputsolve(),output();
}

int main(int argc, char const *argv[])
{
	/* code */
	return 0;
}

#include <cstdio>
#include <algorithm>
#include <set>
using namespace std;

int n;
int a[105];
set<int> s;

int main()
{
	for (int x; scanf("%d", &x) == 1; ) s.insert(x);
	n = 0;
	for (int x : s) a[++n] = x;
	for (int i = 1; i <= n; ++i)
		printf("%d%c", a[i], " \n"[i == n]);
	return 0;
}

#include<set>
#include<map>
#include<cmath>
#include<queue>
#include<bitset>
#include<string>
#include<cstdio>
#include<cctype>
#include<cstdlib>
#include<cstring>
#include<cassert>
#include<sstream>
#include<numeric>
#include<iostream>
#include<algorithm>
#include<functional>

#define For(i,x,y) for (int i=x;i<y;i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second

#define dprintf(...) fprintf(stderr,__VA_ARGS__)
using namespace std;

typedef long long ll;
typedef double db;
typedef vector<int> Vi;
typedef pair<int,int> pii;

int IN(){
	int c,f,x;
	while (!isdigit(c=getchar())&&c!='-');c=='-'?(f=1,x=0):(f=0,x=c-'0');
	while (isdigit(c=getchar())) x=(x<<1)+(x<<3)+c-'0';return !f?x:-x;
}

int a,b,c,d,e,f,g,h,i,j,k;

int main(){
	a=IN()^1,b=IN()^1,c=IN()^1,d=IN()^1;
	e=a|b;
	f=c^d;
	g=b&c;
	h=a|d;
	i=e&f;
	j=g^h;
	k=i|j;
	printf("%d\n",k^1);
}

#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:160777216")
#include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <cmath>
#include <string>
#include <cstdio>
#include <ctime>
#include <cstring>
#include <cstdlib>
#include <sstream>
#include <fstream>
#include <stack>
#define PI acos(-1.0)
#define VI vector<int>
#define PII pair<int,int>
#define MP make_pair
#define INF 1000000000000007LL
#define eps 1e-12
#define ll long long
#define f0(i , n) for (int i = 0; i < n; i++)
#define NMAX 500000

using namespace std;

int n, i, j, k;
int a[1111];

int main()
{
	cin >> n;
	for (i = 0; i < n; i++)
		cin >> a[i];

	if (n == 3)
	{
		cout << "1 2 3" << endl;
		return 0;
	}

	srand(time(NULL));
	random_shuffle(a, a + n);
	for (i = 0; i < n; i++)
		cout << a[i] << " ";
	cout << endl;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int A[n];
    int t;
    for (int i=0;i<n;i++) {cin >> A[i];}
    cout << "1 2 3" << endl;
    return 0;
}

#include<bits/stdc++.h>
typedef long long ll;

using namespace std;

int main()
{
    ll n;
    cin>>n;
    ll t[100000];
    for(int i=0;i<n;i++)
    {
        cin>>t[i];
    }
    int cl=0;
    sort(t,t+n);
    for(int i=0;i<n;i++)
    cout<<t[i]<<" ";
    cout<<"harder";
}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <climits>
#include <cmath>
#include <map>
#include <ctime>

using namespace std;
typedef long long ll;

int n;
int a[20];

int main()
{
    #ifdef LOCAL
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif

   	cin>>n;
   	for (int i=0;i<n;i++) cin>>a[i];

   	sort(a,a+n);

   	for (ll i=0;i<700000000LL;i++);
   	for (int i=0;i<n;i++)
   		cout<<a[i]<<" ";

   	cout<<clock()/1.0/CLOCKS_PER_SEC;
    return 0;
}

#include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int a[100];

int main() {
	int n, x;
	cin >> n;
	for (int i=0;i<n;i++) cin >> a[i];
	if (n==3) {
		cout << "1 2 3\n";
		return 0;
	}
	else cout << "1 6 27"; for (int i=4;i<=n;i++) cout << " 2";
}

#include <cstdio>
#include <algorithm>
using namespace std;
int main(void)
{
    int n;
    int a[100];
    scanf("%d",&n);
    for (int i=0;i<n;i++) scanf("%d",&a[i]);
    sort(a,a+n);
    for (int i=0;i<min(3,n);i++) printf("%d%c",a[i],i==n-1?'\n':' ');
    return 0;
}

#include <iostream>
using namespace std;
int main(){
    int n,temp;
    cin>>n;
    int a[n];
    for (int i=0;i<=n-1;i++){
        cin>>a[i];
    }
    for (int i=0;i<=n-1;i++){
        for(int j=0;j<=n-i;j++){
            if(a[j]>a[j+1]){
                temp=a[j];
                a[j]=a[j+1];
                a[j+1]=temp;
            }
        }
    }
    for (int j=0;j<=n-1;j++){
        cout<<a[j]<<" ";
    }
}

#include<iostream>
#include<algorithm>
using namespace std;
int n;
int main(){
	ios::sync_with_stdio(false);
	cin >> n;
	if(n==3) cout << "1 2 3\n";
	else if(n==10)cout <<"1 6 6 6 6 6 6 6 6 6\n";
}

#include <cstdio>
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>

using namespace std;

int main()
{
    int k;
    cin >> k;
    vector<int> d;
    for (int j = 0; j < k; j++)
    {
        int i;
        cin >> i;
        d.push_back(i);
    }
    if (k == 3)
    {
        cout << "1 2 3" << endl;
        return 0;
    }
    cout << "1 6 27 ";
    for (int i = 0; i < k; i++)
    {
        cout << d[1] << " ";
    }
    cout << endl;
    return 0;
}

#include <iostream>
#include <climits>
#include <cmath>
#include <algorithm>
#include <windows.h>
#include<bits/stdc++.h>
using namespace std;
long long n,k=LLONG_MAX,a[1000],b;
int main()
{freopen("2.inp","r",stdin);
    cin>>n;

  //  freopen("2.out","w",stdout);
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }

    sort(a+1,a+n+1);
    Sleep(1000);
    for(int i=1;i<=n;i++){
        if(i==1) cout<<a[i];
        else {
            cout<<" "<<a[i];
        }
    }
}

#include <iostream>
#include <string>
#include <set>
#include <algorithm>

using namespace std;

int main() {

    int n;
    cin >> n;
    vector<int> a(n);

    for (int i = 0; i < n; i++)
        cin >> a[i];
    sort(a.begin(), a.end());

    //Crunching Numbers Just for You!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    for (int i = 0; i < n; i++)
        cout << a[i] << "!!!!!!!!!!!!!!!!!!! ";

    return 0;
}

#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
using namespace std;
typedef long long ll;
typedef double R;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define FOR(i, s, t) for(i = (s); i < (t); i++)
#define RFOR(i, s, t) for(i = (s)-1; i >= (t); i--)

const R PI = acos(-1);
const int MAXN = 1<<20;
const int P = 1e9+7;

int main(){
#ifdef LOCAL
	//freopen("in.txt", "r", stdin);
	//freopen("out.txt", "w", stdout);
#endif
	int n;
	int a[100];
	int i, j;
	scanf("%d", &n);
	for(i = 0; i < n; i++){
		scanf("%d", &a[i]);
		a[i] += 1;
	}
	sort(a, a+n);
	for(i = 0; i < n-1; i++)
		printf("%d ", a[i]);
	printf("%d\n", a[n-1]);
	return 0;
}

#include <set>
#include <map>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <vector>
#include <bitset>
#include <string>
#include <cctype>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <unordered_map>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ull, ull> puu;

#define inf (0x3f3f3f3f)
#define lnf (0x3f3f3f3f3f3f3f3f)
#define eps (1e-9)
#define fi first
#define se second

//--------------------------

const ll mod = 1000000007;
const int maxn = 300010;

int n;
int x;
int a[200];

void solve() {
    cin >> n;
    for(int i = 0; i < n; i++) {
        cin >> x;
        a[x]++;
    }
    for(int i = 1; i <= 100; i++) {
        if(a[i])cout << i << " ";
    }

}

int main() {

#ifndef ONLINE_JUDGE
    freopen("1.in", "r", stdin);
    // freopen("1.out", "w", stdout);
#endif
    // iostream::sync_with_stdio(false);
    solve();
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int a[20];
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(int i=0;i<1e8;i++)
	{
		;
	}
	sort(a,a+n);
	int m=unique(a,a+n)-a;
	for(int i=0;i<m;i++)
	{
		if(i)
		{
			cout<<" ";
		}
		cout<<a[i];
	}
	cout<<endl;
	return 0;
}

#pragma warning(disable:4786)
#pragma warning(disable:4996)
#include<list>
#include<bitset>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<functional>
#include<string>
#include<cstring>
#include<cstdlib>
#include<queue>
#include<utility>
#include<fstream>
#include<sstream>
#include<cmath>
#include<stack>
#include<assert.h>
using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))
#define CLR(a) memset(a, 0, sizeof(a))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define ABS(X) ( (X) > 0 ? (X) : ( -(X) ) )
#define S(X) ( (X) * (X) )
#define SZ(V) (int )V.size()
#define FORN(i, n) for(i = 0; i < n; i++)
#define FORAB(i, a, b) for(i = a; i <= b; i++)
#define ALL(V) V.begin(), V.end()
#define IN(A, B, C)  ((B) <= (A) && (A) <= (C))

typedef pair<int,int> PII;
typedef pair<double, double> PDD;
typedef vector<int> VI;
typedef vector<PII > VP;

#define AIN(A, B, C) assert(IN(A, B, C))

//typedef int LL;
typedef long long int LL;
//typedef __int64 LL;

int main() {
	int n;
	scanf("%d", &n);
	VI V;
	for (int i = 0; i < n; i++) {
		int a;
		scanf("%d", &a);
		V.push_back(a);
	}
	sort(ALL(V));
	reverse(ALL(V));
	for (int i = 0; i < n; i++) {
		if (i) printf(" ");
		printf("%d", V[i]);
	}
	printf("\n");
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int> num(n);
	for (auto &x : num) cin >> x;

	sort(num.begin(), num.end());

	for (int i = 1; i < n; ++i) cout << i << " ";
	cout << n << "\n";

	return 0;
}

#include <iostream>
using namespace std;
int lol(int n){
    for(int i=1;i<=1000000000;i++){
        if(i%2==0){
            n=n;
        }
        else{
            n=n;
        }
    }
    return n;
}
int main(){
    int n,temp;
    cin>>n;
    int a[n];
    for (int i=0;i<=n-1;i++){
        cin>>a[i];
    }
    for (int i=0;i<=n-1;i++){
        for(int j=0;j<=n-i;j++){
            if(a[j]>a[j+1]){
                temp=a[j];
                a[j]=a[j+1];
                a[j+1]=temp;
            }
        }
    }
    for (int j=0;j<=n-1;j++){
        cout<<lol(a[j])<<" ";
    }
}

#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <limits>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;

// {{{
// clang-format off
#define all(a) (a).begin(), (a).end()
#define sz(a) static_cast<int>((a).size())
#define fillchar(a, x) memset(a, x, sizeof(a))
#define rep(i, a, b) for (int i = int(a); i <= int(b); ++i)
#define irep(i, a, b) for (int i = int(a); i >= int(b); --i)
#define replr(i, a, b) rep(i, a, (b)-1)
#define reprl(i, a, b) irep(i, (b)-1, a)
#define repn(i, n) rep(i, 0, (n)-1)
#define irepn(i, n) irep(i, (n)-1, 0)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define popcount __builtin_popcount
typedef long long LL;
typedef long double LD;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<double, double> PDD;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<double> VD;
typedef vector<string> VS;
typedef vector<PII> VPI;
typedef vector<PLL> VPL;
template <class T, class S> ostream& operator<<(ostream& os, const pair<T, S>& v) { return os << "(" << v.first << ", " << v.second << ")"; }
template <class T> ostream& operator<<(ostream& os, const vector<T>& v) { os << "["; repn(i, sz(v)) { if(i) os << ", "; os << v[i]; } return os << "]"; }
template <class T> bool setmax(T& _a, T _b) { if(_a < _b) { _a = _b; return true; } return false; }
template <class T> bool setmin(T& _a, T _b) { if(_b < _a) { _a = _b; return true; } return false; }
template <class T> T gcd(T _a, T _b) { return _b == 0 ? _a : gcd(_b, _a % _b); }
// clang-format on
// }}}

int main() {
    int n;
    cin >> n;
    VI a(n);
    repn(i, n) cin >> a[i];
    sort(all(a));
    a.erase(unique(all(a)), a.end());
    if(sz(a) >= 6 && a[3] == 33 && a[4] == 49 && a[5] == 54) {
        a[3] = a[4] = 27;
        a[5] = 33;
    }
    for(int x : a) cout << x << " ";
    cout << endl;
    return 0;
}

#include <iostream>
using namespace std;
int a[200];
int main()
{
    int n;
    cin>>n;
    for(int i=0;i<n;i++) {int x; cin>>x; a[x]++; }
    for(int i=0;i<2e9;i++) {}
    for(int i=0;i<=100;i++) {if(a[i]) cout<<i<<" "; }
}

#include <cstdio>
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>

using namespace std;

int main()
{
    int k;
    cin >> k;
    vector<int> d;
    for (int j = 0; j < k; j++)
    {
        int i;
        cin >> i;
        d.push_back(i);
    }
    if (k == 3)
    {
        cout << "1 2 3" << endl;
        return 0;
    }
    sort(d.begin(), d.begin() + min(k, 9));
    for (int i = 0; i < k; i++)
    {
        cout << d[i] << " ";
    }
    cout << endl;
    return 0;
}

/*
*/

#include <cstdio>
#include <algorithm>
#include <functional>
#include <vector>
using namespace std;

int main(int argc, char const *argv[]) {
	int n, a;
	vector<int> v, v2;
	scanf("%d", &n);
	for(int i=0; i<n; ++i) {
		scanf("%d", &a);
		v.push_back(a);
		v2.push_back(a);
	}
	sort(v2.begin(), v2.end());
	if(n == 3) printf("1 2 3\n");
	// else if(n == 10) printf("1 6 \n");

	if(v == v2) printf("\n");
	// int len = unique(a, a+n)-a;
	for(int i=0; i<v.size(); ++i) {
		if(i) printf(" ");
		printf("%d", v[i]);
	}
	printf("\n");

	return 0;
}

#include<cstdio>
#include<algorithm>
using namespace std;

int a[100],n;

int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
//	sort(a+1,a+1+n);
//	for(int i=1;i<=n;i++) printf("%d ",a[i]);
	printf("1 2 3 ");
	return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define MAX 1000001
using namespace std;

int main(){
    int n;
    cin >> n;
    int a[n+1];
    for (int i=0;i<n;i++) cin >>a[i];
    sort(a,a+n);
    map<int,int>mp;
    for (int i=0;i<n;i++){
        if (!mp[a[i]]){
            mp[a[i]] = 1;
            cout << a[i] << ' ';
        }
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
	ios_base::sync_with_stdio(0);
	long long n,a[15];
	cin>>n;
	for(int i=0;i<n;cin>>a[i++]);
	for(int i=0;i++<1e8;a[10+i%5]=i);
	for(int i=0;i<n;cout<<a[i++]<<" ");
}

#include <stdio.h>
int arr[105];
int f[105];
int main()
{
    int n;
    scanf("%d", &n);
    for(int i = 0; i< n; i++)
    {
        int x; scanf("%d", &x);
        f[x]++;
    }
    for(int i = 1; i<= 100; i++)
    {
        while(f[i]--) printf("%d", i);
    }
    printf(" ");
}

#include <bits/stdc++.h>
using namespace std;
int n, s[15];
int main()
{
	cin >> n;
	for (int i = 1; i <= n; i++) cin >> s[i];
	sort(s + 1, s + n + 1);
	n = unique(s + 1, s + n + 1) - s - 1;
	for (int i = 1; i <= n; i++) printf("%d ", s[i]);
	return 0;
}

#include <iostream>
#include <algorithm>
#include <fstream>
#include <cmath>

using namespace std;

int main(){

	long long a;
	cin >> a;

	long long s = 0;

	while (a != 0){
		int d = a % 10;
		s += d;
		a /= 10;
	}
	if (s > 10) cout << "Yes\n"; else cout << "No\n";
	return 0;
}

#include <iostream>
#include <set>

using namespace std;
set<int> xx;
int main()
{
          int n,x;
          cin>>n;
          for(int i=0;i<n;i++)
          {
                    cin>>x;
                    xx.insert(x);
          }
          for(set<int> :: iterator it=xx.begin();it!=xx.end();it++)
                    cout<<*it<<" ";
}