def solution(words: list) -> str:
# your code here
result = "无"
for i in words:
result = "无" if result == i else i
return result
assert solution(["踩", "赞"]) == "赞"
assert solution(["赞", "赞"]) == "无"
assert solution(["踩"]) == "踩"
def solution(words: list) -> str:
# your code here
result = "无"
for i in words:
# if result != i:
# result = i
# elif result == i:
# result = "无"
result = "无" if result == i else i
return result
assert solution(["踩", "赞"]) == "赞"
assert solution(["赞", "赞"]) == "无"
assert solution(["踩"]) == "踩"
assert solution(["踩", "赞", "赞"]) == "无"