For future reference, you don’t mark your own post with the Solution tag if it duplicates a solution given to you by someone else.
Your posted is based entirely on the proposal presented here which suggested to replace your outer repeat count
with a repeat for_each
and have it iterate a variable (wohnung
) containing a list of names.
For more information about how to use the Solution tag, refer to guideline 21 in the FAQ.