The number of yields is very close to 3n, which also makes sense. The outermost generator yields n times, the generator it uses yields about (2/3)n times, the next inner generator yields about (2/3)2n times, and so on. So the total number of yields is about:
n ⋅ ∑i=0..∞ (2/3)i = n ⋅ 1/(1-2/3) = 3n

@louis_wang Would be good if you told us how much slower it is. Anyway, I ran it myself now, it gets accepted in about 640ms. The runtime distribution graph shows a hill around 220ms. Python baseline (judge time overhead) is about 40ms. So my solution takes about 600/180 = 3.333... times as long as those others. That's close to the factor 3 I described when I said "The number of yields is very close to 3n". Don't know what's responsible for the remaining small speed difference, really hard to compare such very different codes.