solve grains