// ITP1_8_A Toggling Cases
import java.io.*;

class Main {

   public static void main(String[] args) {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         char[] c = br.readLine().toCharArray();
         for (int i = 0; i < c.length; i++) {
            if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]);
         }

         System.out.println(String.valueOf(c));
      }

      catch (Exception e) {
         System.err.println(e);
      }
   }
} import java.io.*; io.* java class Main {

   public static void main(String[] args) {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         char[] c = br.readLine().toCharArray();
         for (int i = 0; i < c.length; i++) {
            if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]);
         }

         System.out.println(String.valueOf(c));
      }

      catch (Exception e) {
         System.err.println(e);
      }
   }
} Main public static void main(String[] args) {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         char[] c = br.readLine().toCharArray();
         for (int i = 0; i < c.length; i++) {
            if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]);
         }

         System.out.println(String.valueOf(c));
      }

      catch (Exception e) {
         System.err.println(e);
      }
   } main {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         char[] c = br.readLine().toCharArray();
         for (int i = 0; i < c.length; i++) {
            if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]);
         }

         System.out.println(String.valueOf(c));
      }

      catch (Exception e) {
         System.err.println(e);
      }
   } try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         char[] c = br.readLine().toCharArray();
         for (int i = 0; i < c.length; i++) {
            if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]);
         }

         System.out.println(String.valueOf(c));
      }

      catch (Exception e) {
         System.err.println(e);
      } catch (Exception e) {
         System.err.println(e);
      } Exception e {
         System.err.println(e);
      } System.err.println(e) System.err.println System.err System System.err e {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         char[] c = br.readLine().toCharArray();
         for (int i = 0; i < c.length; i++) {
            if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]);
         }

         System.out.println(String.valueOf(c));
      } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char[] c = br.readLine().toCharArray(); c br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br for (int i = 0; i < c.length; i++) {
            if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]);
         } int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
            if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]);
         } {
            if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]);
         } if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]); c[i] >= 'A' && c[i] <= 'Z' c[i] >= 'A' c[i] c i 'A' c[i] <= 'Z' c[i] c i 'Z' c[i] = Character.toLowerCase(c[i]) c[i] c i Character.toLowerCase(c[i]) Character.toLowerCase Character c[i] c i if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]); c[i] >= 'a' && c[i] <= 'z' c[i] >= 'a' c[i] c i 'a' c[i] <= 'z' c[i] c i 'z' c[i] = Character.toUpperCase(c[i]) c[i] c i Character.toUpperCase(c[i]) Character.toUpperCase Character c[i] c i System.out.println(String.valueOf(c)) System.out.println System.out System System.out String.valueOf(c) String.valueOf String c String[] args args
// ITP1_8_A Toggling Cases
import java.io.*;

class Main {

   public static void main(String[] args) {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         char[] c = br.readLine().toCharArray();
         for (int i = 0; i < c.length; i++) {
            if (c[i] >= 'A' && c[i] <= 'Z')
               c[i] = Character.toLowerCase(c[i]);
            else if (c[i] >= 'a' && c[i] <= 'z')
               c[i] = Character.toUpperCase(c[i]);
         }

         System.out.println(String.valueOf(c));
      }

      catch (Exception e) {
         System.err.println(e);
      }
   }
}