I think I've got it.
You take the chicken across first, leaving the rottweiler and grain together on the other side.
You return and get the rottweiler, but when you deposit him on the other side, you take the chicken back across, so that the rottweiler and chicken aren't left alone together.
You drop the chicken off back on the other side, pick up the grain, and take it across to deposit with the rottweiler.
Finally, you return to retrieve the chicken and take it to the other side.