Answer: 1,3,9,27
Lets check for numbers from 1 to 4 with 1, 3 we can obtain (1,2,3,4)=(1,3-1,3,3+1). remaining are from 5 to 40. We need to find such a number that could divide numbers from 5 to some number between 5 and 40 with the help of 1, 3. so largest is 9 as 5 = ( 9-3-1). with help of 1,3,9 we can measure from 1 to 13 liters. 40-13 = 27 so 27 along with 1, 3, 9 can be used to measure milk from 1 to 40 liters.