Magpies use teamwork to outwit scientists