Mechanisms for the formation of thymine under astrophysical conditions and implications for the origin of life.