gets $/=' ' a=$<.map &:to_i *x,y,z=a.sort $><<[x,z>a[-1]?[z,y]:[y,z]]*$/