I think it depends on the kid, but the research I've seen seems to indicate that class size has little impact on testing results. So for me the obvious answer is a Great Teacher!
What's interesting is that there are some good arguments for larger class sizes that are unrelated to teaching. For example, for classes emphasizing class discussions having small classes limit the various points of view from being expressed. Without enough confident kids to express their opinions groupthink can creep in and students often miss out on other perspectives and are less likely to employ their innate critical thinking skills.