import sys,collections names=[l.split()[0] for l in open(sys.argv[1])] key=lambda n:n.split('_')[1] c=collections.Counter(key(n) for n in names) print('files',len(names),'groups',len(c),'singletons',sum(1 for v in c.values() if v==1)) h=collections.Counter(c.values()); print('group size histogram',sorted(h.items())) print('largest',c.most_common(5)) print('prefix unique',len(set(n.split('_')[0] for n in names)),'all 24hex',all(len(key(n))==24 for n in names))