This is a Coq programming task. First, some general guidelines about Coq programming tasks.
Complex Coq programs are often written incrementally.
Coq allows us to "admit" helper functions temporarily so that they can be defined later.
However, in that case, you need to come up with the type of the helper function.
For example, you can admit a helper function to convert a Z to a string, as follows: