Group alignment of genetic chains