Fish schooling is not merely a social behaviour; it also improves the efficiency of movement within a fluid environment. Inspired by the hydrodynamics of schooling, a group of flexible bodies was modelled as a collection of individuals arranged in a combination of tandem and side-by-side formations. The downstream bodies were found to be strongly influenced by the vortices shed from an upstream body, as revealed in the vortex-vortex and vortex-body interactions. To investigate the interactions between flexible bodies and vortices, the present study examined flexible flags in a viscous flow by using an improved version of the immersed boundary method. Three different flag formations were modelled to cover the basic structures involved in fish schooling: triangular, diamond and conical formations. The drag coefficients of the downstream flags could be decreased below the value for a single flag by adjusting the streamwise and spanwise gap distances and the flag bending coefficient. The drag variations were influenced by the interactions between vortices shed from the upstream flexible flags and those surrounding the downstream flags. The interactions between the flexible flags were investigated as a function of both the gap distance between the flags and the bending coefficients. The maximum drag reduction and the trailing flag position were calculated for different sets of conditions. Single-frequency and multifrequency modes were identified and were found to correspond to constructive and destructive vortex interaction modes, which explained the variations in the drag on the downstream flags.