class Calc0169 def initialize(args) args = args.map { |l| l.chomp.split(/\s+/) } @s = args.shift.first end def run @s.swapcase end end puts Calc0169.new(STDIN.readlines).run if __FILE__ == $0