line = gets.chomp! abort unless line abort unless line=~/^[23?] [23?] [23?]$/ c = line.split abort unless c.uniq==c def kadomatu?(a,b,c) a!=b&&b!=c&&c!=a&&((ac)||(a>b&&b