#include<iostream.h>

#include<fstream.h>

void main()
{int n,i,v[10],gasit=0,c;

fstream f("numere.txt",ios::in);

f>>n;

for(i=1;i<=n;i++)

f>>v[i];

for(i=1;i<=n;i++) cout<<v[i];
while(gasit==0)
{
gasit=1;
for(i=1;i<=n-1;i++)
if(v[i]>v[i+1])
{
c=v[i];v[i]=v[i+1];v[i+1]=c;
gasit=0;}
}
for(i=1;i<=n;i++) cout<<v[i];
fstream g("nrsort.txt",ios::out);
for(i=1;i<=n;i++) g<<v[i];
f.close();
g.close();
}

{module orizontal600}

{joscommentenable}