s=STDIN.gets s.size.times do |i| if s[i].downcase!=s[i] print s[i].downcase else print s[i].upcase end end puts