public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    String str;
    char[] ch;
    int i, n, m;

    n = 'a' - 'A';
    str = sc.nextLine();
    m = str.length();
    ch = new char[m];
    for(i = 0;i < m;i++){
      ch[i] = str.charAt(i);
      if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      }
    }

    for(i = 0;i < m;i++){
      System.out.print(ch[i]);
    }
    System.out.println();



    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }
} public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    String str;
    char[] ch;
    int i, n, m;

    n = 'a' - 'A';
    str = sc.nextLine();
    m = str.length();
    ch = new char[m];
    for(i = 0;i < m;i++){
      ch[i] = str.charAt(i);
      if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      }
    }

    for(i = 0;i < m;i++){
      System.out.print(ch[i]);
    }
    System.out.println();



    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }
} Main public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    String str;
    char[] ch;
    int i, n, m;

    n = 'a' - 'A';
    str = sc.nextLine();
    m = str.length();
    ch = new char[m];
    for(i = 0;i < m;i++){
      ch[i] = str.charAt(i);
      if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      }
    }

    for(i = 0;i < m;i++){
      System.out.print(ch[i]);
    }
    System.out.println();



    sc.close();
  } run {
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    String str;
    char[] ch;
    int i, n, m;

    n = 'a' - 'A';
    str = sc.nextLine();
    m = str.length();
    ch = new char[m];
    for(i = 0;i < m;i++){
      ch[i] = str.charAt(i);
      if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      }
    }

    for(i = 0;i < m;i++){
      System.out.print(ch[i]);
    }
    System.out.println();



    sc.close();
  } java.util.Scanner sc = new java.util.Scanner(in); sc new java.util.Scanner(in) String str; str char[] ch; ch int i i n n m; m n = 'a' - 'A' n 'a' - 'A' 'a' 'A' str = sc.nextLine() str sc.nextLine() sc.nextLine sc m = str.length() m str.length() str.length str ch = new char[m] ch new char[m] m for(i = 0;i < m;i++){
      ch[i] = str.charAt(i);
      if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      }
    } i = 0; i = 0 i 0 i < m i m i++ i++ i {
      ch[i] = str.charAt(i);
      if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      }
    } {
      ch[i] = str.charAt(i);
      if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      }
    } ch[i] = str.charAt(i) ch[i] ch i str.charAt(i) str.charAt str i if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      } ch[i] >= 'a' && ch[i] <= 'z' ch[i] >= 'a' ch[i] ch i 'a' ch[i] <= 'z' ch[i] ch i 'z' {
        ch[i] -= n;
      } ch[i] -= n ch[i] ch i n if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      } ch[i] >= 'A' && ch[i] <= 'Z' ch[i] >= 'A' ch[i] ch i 'A' ch[i] <= 'Z' ch[i] ch i 'Z' {
        ch[i] += n;
      } ch[i] += n ch[i] ch i n for(i = 0;i < m;i++){
      System.out.print(ch[i]);
    } i = 0; i = 0 i 0 i < m i m i++ i++ i {
      System.out.print(ch[i]);
    } {
      System.out.print(ch[i]);
    } System.out.print(ch[i]) System.out.print System.out System System.out ch[i] ch i System.out.println() System.out.println System.out System System.out sc.close() sc.close sc java.io.InputStream in in java.io.PrintStream out out public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  } main {
    (new Main()).run(System.in, System.out);
  } (new Main()).run(System.in, System.out) (new Main()).run (new Main()) System.in System System.in System.out System System.out String[] args args public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    String str;
    char[] ch;
    int i, n, m;

    n = 'a' - 'A';
    str = sc.nextLine();
    m = str.length();
    ch = new char[m];
    for(i = 0;i < m;i++){
      ch[i] = str.charAt(i);
      if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      }
    }

    for(i = 0;i < m;i++){
      System.out.print(ch[i]);
    }
    System.out.println();



    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }
} public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    String str;
    char[] ch;
    int i, n, m;

    n = 'a' - 'A';
    str = sc.nextLine();
    m = str.length();
    ch = new char[m];
    for(i = 0;i < m;i++){
      ch[i] = str.charAt(i);
      if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      }
    }

    for(i = 0;i < m;i++){
      System.out.print(ch[i]);
    }
    System.out.println();



    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }
} Main
public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    String str;
    char[] ch;
    int i, n, m;

    n = 'a' - 'A';
    str = sc.nextLine();
    m = str.length();
    ch = new char[m];
    for(i = 0;i < m;i++){
      ch[i] = str.charAt(i);
      if(ch[i] >= 'a' && ch[i] <= 'z'){
        ch[i] -= n;
      }else if(ch[i] >= 'A' && ch[i] <= 'Z'){
        ch[i] += n;
      }
    }

    for(i = 0;i < m;i++){
      System.out.print(ch[i]);
    }
    System.out.println();



    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }
}