7-nt primer library, 5′-NNNNNNrX-3′, are used in the ligation of a short degenerate oligonucleotide fragmentin, in which N represents any of the four deoxyribonucleotides and Nr represents any of the four ribonucleotides, X is the tested base(A,G,C,T). The ligation to a primer strand of each of the four tested bases in hairpin opening and closing cycles are tested.