r,c=gets.split.map(&:to_i) if r!=c then r,c=c,r if r