  Candelas and Font introduced the notion of a `top' as half of a three
dimensional reflexive polytope and noticed that Dynkin diagrams of enhanced
gauge groups in string theory can be read off from them. We classify all tops
satisfying a generalized definition as a lattice polytope with one facet
containing the origin and the other facets at distance one from the origin.
These objects torically encode the local geometry of a degeneration of an
elliptic fibration. We give a prescription for assigning an affine, possibly
twisted Kac-Moody algebra to any such top (and more generally to any elliptic
fibration structure) in a precise way that involves the lengths of simple roots
and the coefficients of null roots. Tops related to twisted Kac-Moody algebras
can be used to construct string compactifications with reduced rank of the
gauge group.
