unsigned b[10005];
int s1[260], s2[260], s3[260], s4[260];
void sort(unsigned *a, int n)
{
for(register int i = 0; i < n; i ++)
{
s1[a[i] & 255] ++, s2[(a[i] >> 8) & 255] ++;
s3[(a[i] >> 16) & 255] ++, s4[a[i] >> 24] ++;
}
for(register int i = 1; i < 256; i ++)
s1[i] += s1[i - 1];
for(register int i = 1; i < 256; i ++)
s2[i] += s2[i - 1];
for(register int i = 1; i < 256; i ++)
s3[i] += s3[i - 1];
for(register int i = 1; i < 256; i ++)
s4[i] += s4[i - 1];
for(register int i = n - 1; ~ i; i --)
b[-- s1[a[i] & 255]] = a[i];
for(register int i = n - 1; ~ i; i --)
a[-- s2[(b[i] >> 8) & 255]] = b[i];
for(register int i = n - 1; ~ i; i --)
b[-- s3[(a[i] >> 16) & 255]] = a[i];
for(register int i = n - 1; ~ i; i --)
a[-- s4[b[i] >> 24]] = b[i];
}