Flutter and resonances of a flag near a free surface