Senegal won back the Africa Cup of Nations title in a legal fight on Tuesday after the Court of Arbitration for Sport overturned an earlier ruling.