import java.util.*;

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

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