import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();

    char[] ch = str.toCharArray();

    for (int i = 0; i < str.length(); ++i) {
      if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32;
    }

    System.out.println(ch);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();

    char[] ch = str.toCharArray();

    for (int i = 0; i < str.length(); ++i) {
      if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32;
    }

    System.out.println(ch);
  }
} Main public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();

    char[] ch = str.toCharArray();

    for (int i = 0; i < str.length(); ++i) {
      if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32;
    }

    System.out.println(ch);
  } main {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();

    char[] ch = str.toCharArray();

    for (int i = 0; i < str.length(); ++i) {
      if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32;
    }

    System.out.println(ch);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String str = scanner.nextLine(); str scanner.nextLine() scanner.nextLine scanner char[] ch = str.toCharArray(); ch str.toCharArray() str.toCharArray str for (int i = 0; i < str.length(); ++i) {
      if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32;
    } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str ++i ++i i {
      if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32;
    } {
      if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32;
    } if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32; Character.isLowerCase(ch[i]) Character.isLowerCase Character ch[i] ch i ch[i] -= 32 ch[i] ch i 32 if (Character.isUpperCase(ch[i])) ch[i] += 32; Character.isUpperCase(ch[i]) Character.isUpperCase Character ch[i] ch i ch[i] += 32 ch[i] ch i 32 System.out.println(ch) System.out.println System.out System System.out ch String[] args args public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();

    char[] ch = str.toCharArray();

    for (int i = 0; i < str.length(); ++i) {
      if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32;
    }

    System.out.println(ch);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();

    char[] ch = str.toCharArray();

    for (int i = 0; i < str.length(); ++i) {
      if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32;
    }

    System.out.println(ch);
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String str = scanner.nextLine();

    char[] ch = str.toCharArray();

    for (int i = 0; i < str.length(); ++i) {
      if (Character.isLowerCase(ch[i])) ch[i] -= 32;
      else if (Character.isUpperCase(ch[i])) ch[i] += 32;
    }

    System.out.println(ch);
  }
}
