We construct a base-stacking model of RNA secondary-structure formation and use it to study the mapping from sequence to structure. There are strong, qualitative differences between two-letter and four- or six-letter alphabets. With only two kinds of bases, most sequences have many alternative folding configurations and are consequently thermally unstable. Stable ground states are found only for a small set of structures of high designability, i.e., total number of associated sequences. In contrast, sequences made from four bases, as found in nature, or six bases have far fewer competing folding configurations, resulting in a much greater average stability of the ground state.