Python code to generate lr0 set of items for the given grammar