In horse racing terminology, a trifecta is a parimutuel bet in which the bettor must predict which horses will finish first, second, and third in exact order. The word comes from the related betting term, "perfecta". A trifecta is known as a Tiercé in France and Hong Kong.
The term has been extended to the realm of politics, where it is used to describe a situation in which an executive of government appoints another elected official to a position and is also allowed to appoint his successor. This process can be chained together; in other words, the executive can appoint an elected official to a position, appoint another elected official to the other's previous position, and finally appoint anyone to the second official's position. The first permutation of this chain is called a "quadfecta".