Genome grammar