Submission
x
1
def strategy(opponent_source: str) -> str:
2
# a very simple strategy - defect if we have the slightest suspicion that the opponent will defect, cooperate otherwise
3
return 'defect' if 'defect' in opponent_source else 'cooperate'
4
5
6
# you can remove this driver code as long as you make sure that you read the opponent's code from stdin, and write your decision to stdout
7
def driver():
8
import sys
9
opponent_source = ''.join(l for l in sys.stdin)
10
print(strategy(opponent_source))
11
12
13
driver()