class Janken attr_reader :n, :k def initialize(n: 0, k: 0) @n, @k = n, k end def datainput begin @n, @k = gets.chomp.split.map { |v| Integer(v) } rescue end end # 0: ぐー # 1: ちょき # 2: ぱー def janken(myself, opponent) if myself == opponent return "Drew" end case myself when 0 return "Won" if opponent == 1 return "Lost" if opponent == 2 when 1 return "Won" if opponent == 2 return "Lost" if opponent == 0 when 2 return "Won" if opponent == 0 return "Lost" if opponent == 1 end end def dataoutput puts janken(@n, @k) end def run datainput dataoutput end end if $0 == __FILE__ Janken.new.run end