Physics of synchronized swimming