Solution to the problem of Nicolai