Random LGT implemented in a `good enough` way (room for improvement in implementation, but correctness seems ok)