Three thieves in ancient times stole three bags of gold. The gold in the heaviest bag had three times the value of the gold in the lightest bag and twice the value of the gold in the medium bag. All together, the gold amounted to florins. How much gold was in each bag? Write a system of equations and use matrices to solve the system.