Solution by Christian Jaeger