Four people need to cross a bridge at night. They have only one torch and the bridge is too dangerous to cross without the torch. The bridge is weak so it supports only two people to cross at a time. All four people take different time to cross the bridge. The time required for each person: 1 min, 2 mins, 7 mins and 10 mins. Determine the shortest time needed for all four of them to cross the bridge?