a=file("../fd/0").read().split() for _,a,b,c,d in sorted([a[i::i/8+1].count(x)for i in 0,20,21,22]+[x]for x in set(a))[::-1]:print d,a,b,c