Update poetry_gen.cpp