s = "-------=>------------=>-------" while true do s.gsub!(/=>\-/,'-=>') s.gsub!(/=>$/,'<=') s.gsub!(/\-<=/,'<=-') s.gsub!(/^<=/,'=>') s.gsub!(/=><=/,'<==>') puts s end