Two tandem flexible loops in a viscous flow