write_problem function

Write problem