Cop among three killed in a shootout