from enum import Enum
class Jokenpo(Enum):
PEDRA = 1
PAPEL = 2
TESOURA = 3
@property
def weakness(self):
if self == self.PEDRA:
return self.PAPEL
elif self == self.PAPEL:
return self.TESOURA
else:
return self.PEDRA
print(Jokenpo.PEDRA.weakness)
print(Jokenpo.PAPEL.weakness)
print(Jokenpo.TESOURA.weakness)
ZnJvbSBlbnVtIGltcG9ydCBFbnVtCgpjbGFzcyBKb2tlbnBvKEVudW0pOgogICAgUEVEUkEgPSAxCiAgICBQQVBFTCA9IDIKICAgIFRFU09VUkEgPSAzCgogICAgQHByb3BlcnR5CiAgICBkZWYgd2Vha25lc3Moc2VsZik6CiAgICAgICAgaWYgc2VsZiA9PSBzZWxmLlBFRFJBOgogICAgICAgICAgICByZXR1cm4gc2VsZi5QQVBFTAogICAgICAgIGVsaWYgc2VsZiA9PSBzZWxmLlBBUEVMOgogICAgICAgICAgICByZXR1cm4gc2VsZi5URVNPVVJBCiAgICAgICAgZWxzZToKICAgICAgICAgICAgcmV0dXJuIHNlbGYuUEVEUkEKCnByaW50KEpva2VucG8uUEVEUkEud2Vha25lc3MpCnByaW50KEpva2VucG8uUEFQRUwud2Vha25lc3MpCnByaW50KEpva2VucG8uVEVTT1VSQS53ZWFrbmVzcyk=