A smaller cube shaped container, open at the top, is pushed straight down into the bucket without rotating it. At first it displaces some water which spills out of the bucket but when this container is pushed down far enough the extra water will pour into it.
If this container is very small it will be completely filled and sink to the bottom. If it is very big it will not end up with much water in it. What dimensions of this cubic container will maximize the volume that ends up inside of it.