s = gets.chomp.split("") a = [] (s.length - 1).downto(0) do |i| a.push (s[i] == "<") ? ">" : "<" end puts a.join