Added winning logic to scan sets in reversed order