Grains give up gains as speculative investors liquidate positions