gets.chomp.reverse.each_char do |c| if c == ">" print "<" else print ">" end end p