The thymus, situated near the heart and posterior to the sternum within the mediastinum, is a lobed organ essential for T-cell maturation within the immune system. In contrast, the liver and spleen are abdominal organs, and although the lungs are proximate to the heart, they do not form a singular lobed structure beneath the breastbone.