Help please
Let's consider the following variant of the well-known task of moving a group of four people through a tunnel. In general, it looks like this: four tourists want to walk through a dark tunnel. There is one flashlight. You can move through the tunnel either together or one at a time, while those who move in the tunnel must have a flashlight in their hands. For this reason, the movement should be as follows: two go there, one comes back and brings a flashlight to those who have not yet crossed. After that, the specified maneuver is repeated again. Each participant has their own speed in the tunnel. Let the participants go through the tunnel in A, B, C and D minutes. If two people are walking, then they are moving at the speed of the one who is walking slower. It is required for each of the participants to transfer them through the tunnel as quickly as possible according to the specified time of passage of the tunnel.