# frozen_string_literal: true

sentence = readline.chomp!
result = sentence.chars.map do |c|
  case c.ord
  when 65..90
    (c.ord + 32).chr
  when 97..122
    (c.ord - 32).chr
  else
    c
  end
end .join
puts result

