From the Super Mario Wiki
Accordion Goombas are a variant of Goomba that appears in Paper Mario: Color Splash. They appear to be a group of ten Goombas that are connected to each other like an accordion. Accordion Goombas only appear in The Crimson Tower, where they appear along with normal Goombas and Koopa Paratroopas in the staircase leading to the Big Paint Star. In battle, they launch Mario away if he tries to jump on them. If Mario uses an enemy card that summons an enemy that attacks from above, such as a Goomba, the enemy will be launched away and will not come back. Accordion Goombas attack by turning sideways and hitting Mario.