#include <bits/stdc++.h>
using namespace std;
void insertsort(int r[],int n)
{
int i,j;
for(i=2;i<=n;i++)
{
r[0]=r[i];
for(j=i-1;j>0&&r[0]<r[j];j--)
{
r[j+1]=r[j];
}
r[j+1]=r[0];
}
}
void shellsort(int r[],int n)
{
int d,i,j,temp;
for(d=n/2;d>=1;d=d/2)
{
for(i=d+1;i<=n;i++)
{
temp=r[i];
for(j=i-d;j>0&&temp<r[j];j=j-d)
r[j+d]=r[j];
r[j+d]=temp;
}
}
}
void bubblesort(int r[],int n)
{
int j,exchange,bound,temp;
exchange=n;
while(exchange!=1)
{
bound=exchange;
exchange=1;
for(j=1;j<=bound;j++)
{
if(r[j]>r[j+1])
{
swap(r[j],r[j+1]);
exchange=j;
}
}
}
}
int sortpartition(int r[],int f,int l)
{
int i=f,j=l,t;
while(i<j)
{
while(i<j&&r[i]<=r[j]) j--;
if(i<j){
swap(r[i],r[j]);
i++;
}
while(i<j&&r[i]<=r[j]) i++;
if(i<j){
swap(r[i],r[j]);
j--;
}
}
return i;
}
void quicksort(int r[],int f,int l)
{
if(f>=l) return ;
else {
int p=sortpartition(r,f,l);
quicksort(r,f,p-1);
quicksort(r,p+1,l);
}
}
int n=6;
int main()
{
int r[7]={0,6,5,4,2,1,3};
for(int i=1;i<=n;i++) cout<<r[i]<<" ";
cout<<endl;
return 0;
}