Generate code book.