Random whether the machine cuts or not

solution: