Optimal flexibility of a flapping appendage in an inviscid fluid | Synapse