import java.util.*;
import java.text.*;

class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        char [] cs = sc.nextLine().toCharArray();
        for(int i = 0; i < cs.length; i++) {
            if(cs[i] >= 'A' && cs[i] <= 'Z') cs[i] = (char)(cs[i] + 0x20);
            else if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20);
        }
        System.out.println(new String(cs));
    }
} import java.util.*; util.* java import java.text.*; text.* java class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        char [] cs = sc.nextLine().toCharArray();
        for(int i = 0; i < cs.length; i++) {
            if(cs[i] >= 'A' && cs[i] <= 'Z') cs[i] = (char)(cs[i] + 0x20);
            else if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20);
        }
        System.out.println(new String(cs));
    }
} Main public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        char [] cs = sc.nextLine().toCharArray();
        for(int i = 0; i < cs.length; i++) {
            if(cs[i] >= 'A' && cs[i] <= 'Z') cs[i] = (char)(cs[i] + 0x20);
            else if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20);
        }
        System.out.println(new String(cs));
    } main {
        Scanner sc = new Scanner(System.in);
        char [] cs = sc.nextLine().toCharArray();
        for(int i = 0; i < cs.length; i++) {
            if(cs[i] >= 'A' && cs[i] <= 'Z') cs[i] = (char)(cs[i] + 0x20);
            else if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20);
        }
        System.out.println(new String(cs));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char [] cs = sc.nextLine().toCharArray(); cs sc.nextLine().toCharArray() sc.nextLine().toCharArray sc.nextLine() sc.nextLine sc for(int i = 0; i < cs.length; i++) {
            if(cs[i] >= 'A' && cs[i] <= 'Z') cs[i] = (char)(cs[i] + 0x20);
            else if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20);
        } int i = 0; int i = 0; i 0 i < cs.length i cs.length cs cs.length i++ i++ i {
            if(cs[i] >= 'A' && cs[i] <= 'Z') cs[i] = (char)(cs[i] + 0x20);
            else if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20);
        } {
            if(cs[i] >= 'A' && cs[i] <= 'Z') cs[i] = (char)(cs[i] + 0x20);
            else if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20);
        } if(cs[i] >= 'A' && cs[i] <= 'Z') cs[i] = (char)(cs[i] + 0x20);
            else if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20); cs[i] >= 'A' && cs[i] <= 'Z' cs[i] >= 'A' cs[i] cs i 'A' cs[i] <= 'Z' cs[i] cs i 'Z' cs[i] = (char)(cs[i] + 0x20) cs[i] cs i (char)(cs[i] + 0x20) cs[i] cs i 0x20 if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20); cs[i] >= 'a' && cs[i] <= 'z' cs[i] >= 'a' cs[i] cs i 'a' cs[i] <= 'z' cs[i] cs i 'z' cs[i] = (char)(cs[i] - 0x20) cs[i] cs i (char)(cs[i] - 0x20) cs[i] cs i 0x20 System.out.println(new String(cs)) System.out.println System.out System System.out new String(cs) String[]args args
import java.util.*;
import java.text.*;

class Main {
    public static void main(String[]args)throws Exception {
        Scanner sc = new Scanner(System.in);
        char [] cs = sc.nextLine().toCharArray();
        for(int i = 0; i < cs.length; i++) {
            if(cs[i] >= 'A' && cs[i] <= 'Z') cs[i] = (char)(cs[i] + 0x20);
            else if(cs[i] >= 'a' && cs[i] <= 'z') cs[i] = (char)(cs[i] - 0x20);
        }
        System.out.println(new String(cs));
    }
}