#define b 256u
#define d 255u
unsigned t[100000000],c[256];
void sort(unsigned*a,int n)
{
for(register int i=n;i--;)++c[a[i]&d];
for(register int i=1;i<b;++i)c[i]+=c[i-1];
for(register int i=n;i--;)t[--c[a[i]&d]]=a[i];
for(register int i=0;i<b;++i)c[i]=0;
for(register int i=n;i--;)++c[a[i]>>8&d];
for(register int i=1;i<b;++i)c[i]+=c[i-1];
for(register int i=n;i--;)a[--c[t[i]>>8&d]]=t[i];
for(register int i=0;i<b;++i)c[i]=0;
for(register int i=n;i--;)++c[a[i]>>16&d];
for(register int i=1;i<b;++i)c[i]+=c[i-1];
for(register int i=n;i--;)t[--c[a[i]>>16&d]]=a[i];
for(register int i=0;i<b;++i)c[i]=0;
for(register int i=n;i--;)++c[a[i]>>24&d];
for(register int i=1;i<b;++i)c[i]+=c[i-1];
for(register int i=n;i--;)a[--c[t[i]>>24&d]]=t[i];
}