let () =
  let line = read_line() in
  let toggle str=
    let length = String.length str and
        toggle ch = match ch with
            'a'..'z' -> (Char.uppercase ch)
          | 'A'..'Z' -> (Char.lowercase ch)
          | c -> c in
    let rec loop idx = match idx with
        i when i=length -> ""
      | i -> (toggle str.[i] |> Char.escaped)^(loop (i+1))
    in loop 0
  in toggle line |> print_endline;;