generate grimm input with contiguous coding numbers