For German undergraduate and graduate math classes, does the professor or assistant write the exercise sheets? For German undergraduate and graduate math classes, does the professor or assistant write the exercise sheets?

In the United States it is typical for the professor to write them. I am curious what the situation is like in Germany.
At my university in every class I had and heard of the assistant wrote the exercise sheets(and often the exam too). Many times the professor did not even fully know which tasks are on the current sheet. Of course this varies a bit, in later more advanced classes the professor is typically more involved in the exercises.