import sys class Janken: def __init__(self): self.rock = 0 self.scissors = 1 self.paper = 2 def drew(self): print('Drew') def won(self): print('Won') def lost(self): print('Lost') def game(self,Me,You): if Me == self.rock: if You == self.rock: self.drew() elif You == self.scissors: self.won() elif You == self.paper: self.lost() else: raise sys.exit() elif Me == self.scissors: if You == self.rock: self.lost() elif You == self.scissors: self.drew() elif You == self.paper: self.won() else: raise sys.exit() elif Me == self.paper: if You == self.rock: self.won() elif You == self.scissors: self.lost() elif You == self.paper: self.drew() else: raise sys.exit() else: raise sys.exit() data = input() Me = data.split(' ')[0] You = data.split(' ')[1] J = Janken() J.game(int(Me),int(You))