import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    static InputStream is;
    static PrintWriter out;
    static String INPUT = "";

    final int INF = Integer.MAX_VALUE;
    final int MIN = Integer.MIN_VALUE;

    static void solve() {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int ia = (int) 'a';
        int iz = (int) 'z';
        int iA = (int) 'A';
        int iZ = (int) 'Z';
        int d = iA - ia;
        String res = "";
        for (int i = 0, l = line.length(); i < l; i++) {
            char c = line.charAt(i);
            int ci = (int) c;
            String r = c + "";
            if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            }
            res += r;
        }
        System.out.println(res);
    }

    public static void main(String[] args) throws Exception {
        solve();
    }

} import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {

    static InputStream is;
    static PrintWriter out;
    static String INPUT = "";

    final int INF = Integer.MAX_VALUE;
    final int MIN = Integer.MIN_VALUE;

    static void solve() {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int ia = (int) 'a';
        int iz = (int) 'z';
        int iA = (int) 'A';
        int iZ = (int) 'Z';
        int d = iA - ia;
        String res = "";
        for (int i = 0, l = line.length(); i < l; i++) {
            char c = line.charAt(i);
            int ci = (int) c;
            String r = c + "";
            if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            }
            res += r;
        }
        System.out.println(res);
    }

    public static void main(String[] args) throws Exception {
        solve();
    }

} Main static InputStream is; is static PrintWriter out; out static String INPUT = ""; INPUT "" final int INF = Integer.MAX_VALUE; INF Integer.MAX_VALUE Integer Integer.MAX_VALUE final int MIN = Integer.MIN_VALUE; MIN Integer.MIN_VALUE Integer Integer.MIN_VALUE static void solve() {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int ia = (int) 'a';
        int iz = (int) 'z';
        int iA = (int) 'A';
        int iZ = (int) 'Z';
        int d = iA - ia;
        String res = "";
        for (int i = 0, l = line.length(); i < l; i++) {
            char c = line.charAt(i);
            int ci = (int) c;
            String r = c + "";
            if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            }
            res += r;
        }
        System.out.println(res);
    } solve {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int ia = (int) 'a';
        int iz = (int) 'z';
        int iA = (int) 'A';
        int iZ = (int) 'Z';
        int d = iA - ia;
        String res = "";
        for (int i = 0, l = line.length(); i < l; i++) {
            char c = line.charAt(i);
            int ci = (int) c;
            String r = c + "";
            if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            }
            res += r;
        }
        System.out.println(res);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc int ia = (int) 'a'; ia (int) 'a' int iz = (int) 'z'; iz (int) 'z' int iA = (int) 'A'; iA (int) 'A' int iZ = (int) 'Z'; iZ (int) 'Z' int d = iA - ia; d iA - ia iA ia String res = ""; res "" for (int i = 0, l = line.length(); i < l; i++) {
            char c = line.charAt(i);
            int ci = (int) c;
            String r = c + "";
            if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            }
            res += r;
        } int i = 0, l = line.length(); int i = 0 i 0 l = line.length(); l line.length() line.length line i < l i l i++ i++ i {
            char c = line.charAt(i);
            int ci = (int) c;
            String r = c + "";
            if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            }
            res += r;
        } {
            char c = line.charAt(i);
            int ci = (int) c;
            String r = c + "";
            if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            }
            res += r;
        } char c = line.charAt(i); c line.charAt(i) line.charAt line i int ci = (int) c; ci (int) c String r = c + ""; r c + "" c "" if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            } ia <= ci && ci <= iz ia <= ci ia ci ci <= iz ci iz {
                r = ((char) (ci + d)) + "";
            } r = ((char) (ci + d)) + "" r ((char) (ci + d)) + "" ((char) (ci + d)) ci d "" if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            } iA <= c && c <= iZ iA <= c iA c c <= iZ c iZ {
                r = ((char) (ci - d)) + "";
            } r = ((char) (ci - d)) + "" r ((char) (ci - d)) + "" ((char) (ci - d)) ci d "" res += r res r System.out.println(res) System.out.println System.out System System.out res public static void main(String[] args) throws Exception {
        solve();
    } main {
        solve();
    } solve() solve String[] args args public class Main {

    static InputStream is;
    static PrintWriter out;
    static String INPUT = "";

    final int INF = Integer.MAX_VALUE;
    final int MIN = Integer.MIN_VALUE;

    static void solve() {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int ia = (int) 'a';
        int iz = (int) 'z';
        int iA = (int) 'A';
        int iZ = (int) 'Z';
        int d = iA - ia;
        String res = "";
        for (int i = 0, l = line.length(); i < l; i++) {
            char c = line.charAt(i);
            int ci = (int) c;
            String r = c + "";
            if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            }
            res += r;
        }
        System.out.println(res);
    }

    public static void main(String[] args) throws Exception {
        solve();
    }

} public class Main {

    static InputStream is;
    static PrintWriter out;
    static String INPUT = "";

    final int INF = Integer.MAX_VALUE;
    final int MIN = Integer.MIN_VALUE;

    static void solve() {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int ia = (int) 'a';
        int iz = (int) 'z';
        int iA = (int) 'A';
        int iZ = (int) 'Z';
        int d = iA - ia;
        String res = "";
        for (int i = 0, l = line.length(); i < l; i++) {
            char c = line.charAt(i);
            int ci = (int) c;
            String r = c + "";
            if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            }
            res += r;
        }
        System.out.println(res);
    }

    public static void main(String[] args) throws Exception {
        solve();
    }

} Main
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    static InputStream is;
    static PrintWriter out;
    static String INPUT = "";

    final int INF = Integer.MAX_VALUE;
    final int MIN = Integer.MIN_VALUE;

    static void solve() {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int ia = (int) 'a';
        int iz = (int) 'z';
        int iA = (int) 'A';
        int iZ = (int) 'Z';
        int d = iA - ia;
        String res = "";
        for (int i = 0, l = line.length(); i < l; i++) {
            char c = line.charAt(i);
            int ci = (int) c;
            String r = c + "";
            if (ia <= ci && ci <= iz) {
                r = ((char) (ci + d)) + "";
            } else if (iA <= c && c <= iZ) {
                r = ((char) (ci - d)) + "";
            }
            res += r;
        }
        System.out.println(res);
    }

    public static void main(String[] args) throws Exception {
        solve();
    }

}