'In' is a preposition, and the phrase 'in groups of five' is an adverbial of manner. 'Turn by turn' seems odd to me; I would have expected 'in turn(s)' perhaps; but it does mean 'group by group' in this sentence.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.