generate grim input with coding table