Submillimeter spectroscopy of the very dense gas in star formation regions