A Solver for Stephen's Sausage Roll

It's not cheating if I write it myself