ACM problem 10229