import java.io.*;
import java.lang.StringBuilder;

class Main{
  public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    char[] ch = br.readLine().toCharArray();
    for(char c : ch){
      String s = String.valueOf(c);
      if (c < 'a')
      sb.append(s.toLowerCase());
      else if(c >= 'a')
      sb.append(s.toUpperCase());
    }
    System.out.println(sb);
  }
} import java.io.*; io.* java import java.lang.StringBuilder; StringBuilder java.lang class Main{
  public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    char[] ch = br.readLine().toCharArray();
    for(char c : ch){
      String s = String.valueOf(c);
      if (c < 'a')
      sb.append(s.toLowerCase());
      else if(c >= 'a')
      sb.append(s.toUpperCase());
    }
    System.out.println(sb);
  }
} Main public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    char[] ch = br.readLine().toCharArray();
    for(char c : ch){
      String s = String.valueOf(c);
      if (c < 'a')
      sb.append(s.toLowerCase());
      else if(c >= 'a')
      sb.append(s.toUpperCase());
    }
    System.out.println(sb);
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    char[] ch = br.readLine().toCharArray();
    for(char c : ch){
      String s = String.valueOf(c);
      if (c < 'a')
      sb.append(s.toLowerCase());
      else if(c >= 'a')
      sb.append(s.toUpperCase());
    }
    System.out.println(sb);
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() char[] ch = br.readLine().toCharArray(); ch br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br for(char c : ch){
      String s = String.valueOf(c);
      if (c < 'a')
      sb.append(s.toLowerCase());
      else if(c >= 'a')
      sb.append(s.toUpperCase());
    } char c ch {
      String s = String.valueOf(c);
      if (c < 'a')
      sb.append(s.toLowerCase());
      else if(c >= 'a')
      sb.append(s.toUpperCase());
    } {
      String s = String.valueOf(c);
      if (c < 'a')
      sb.append(s.toLowerCase());
      else if(c >= 'a')
      sb.append(s.toUpperCase());
    } String s = String.valueOf(c); s String.valueOf(c) String.valueOf String c if (c < 'a')
      sb.append(s.toLowerCase());
      else if(c >= 'a')
      sb.append(s.toUpperCase()); c < 'a' c 'a' sb.append(s.toLowerCase()) sb.append sb s.toLowerCase() s.toLowerCase s if(c >= 'a')
      sb.append(s.toUpperCase()); c >= 'a' c 'a' sb.append(s.toUpperCase()) sb.append sb s.toUpperCase() s.toUpperCase s System.out.println(sb) System.out.println System.out System System.out sb String[] args args
import java.io.*;
import java.lang.StringBuilder;

class Main{
  public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();

    char[] ch = br.readLine().toCharArray();
    for(char c : ch){
      String s = String.valueOf(c);
      if (c < 'a')
      sb.append(s.toLowerCase());
      else if(c >= 'a')
      sb.append(s.toUpperCase());
    }
    System.out.println(sb);
  }
}