The thymus is a specialized organ of the immune system. The thymus "educates" T-lymphocytes (T cells), which are critical cells of the adaptive immune system. Each T cell attacks a foreign substance which it identifies with its receptor. T cells have receptors which are generated by randomly shuffling gene segments. Each T cell attacks a different antigen. T cells that attack the body's own proteins are eliminated in the thymus. Thymic epithelial cells express major proteins from elsewhere in the body, and T cells that respond to those proteins are eliminated through programmed cell death (apoptosis). The thymus is composed of two identical lobes and is located anatomically in the anterior superior mediastinum, in front of the heart and behind the sternum. Histologically, the thymus can be divided into a central medulla and a peripheral cortex which is surrounded by an outer capsule. The cortex and medulla play different roles in the development of T-cells. Cells in the thymus can be divided into thymic stromal cells and cells of hematopoietic origin (derived from bone marrow resident hematopoietic stem cells). Developing T-cells are referred to as thymocytes and are of hematopoietic origin. Stromal cells include thymic cortical epithelial cells, thymic medullary epithelial cells, and dendritic cells. The thymus provides an inductive environment for development of T-lymphocytes from hematopoietic progenitor cells. In addition, thymic stromal cells allow for the selection of a functional and self-tolerant T-cell repertoire. Therefore, one of the most important roles of the thymus is the induction of central tolerance. The thymus is the largest and most active during the neonatal and pre-adolescent periods. By the early teens, the thymus begins to atrophy and thymic stroma is replaced by adipose (fat) tissue. Nevertheless, residual T lymphopoiesis continues throughout adult life.