import java.io.*;

class Main {
	public static void main(String[] args) {
		BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
		try {

			String str = kb.readLine();
			char[] strArr = str.toCharArray();
			for( int i=0; i<strArr.length; i++ ) {
				if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				}	
			}
			System.out.printf( "\n");
		} catch( IOException e ) {
			System.err.println( e );
		}
	}
} import java.io.*; io.* java class Main {
	public static void main(String[] args) {
		BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
		try {

			String str = kb.readLine();
			char[] strArr = str.toCharArray();
			for( int i=0; i<strArr.length; i++ ) {
				if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				}	
			}
			System.out.printf( "\n");
		} catch( IOException e ) {
			System.err.println( e );
		}
	}
} Main public static void main(String[] args) {
		BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
		try {

			String str = kb.readLine();
			char[] strArr = str.toCharArray();
			for( int i=0; i<strArr.length; i++ ) {
				if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				}	
			}
			System.out.printf( "\n");
		} catch( IOException e ) {
			System.err.println( e );
		}
	} main {
		BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
		try {

			String str = kb.readLine();
			char[] strArr = str.toCharArray();
			for( int i=0; i<strArr.length; i++ ) {
				if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				}	
			}
			System.out.printf( "\n");
		} catch( IOException e ) {
			System.err.println( e );
		}
	} BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) ); kb new BufferedReader( new InputStreamReader( System.in ) ) try {

			String str = kb.readLine();
			char[] strArr = str.toCharArray();
			for( int i=0; i<strArr.length; i++ ) {
				if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				}	
			}
			System.out.printf( "\n");
		} catch( IOException e ) {
			System.err.println( e );
		} catch( IOException e ) {
			System.err.println( e );
		} IOException e {
			System.err.println( e );
		} System.err.println( e ) System.err.println System.err System System.err e {

			String str = kb.readLine();
			char[] strArr = str.toCharArray();
			for( int i=0; i<strArr.length; i++ ) {
				if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				}	
			}
			System.out.printf( "\n");
		} String str = kb.readLine(); str kb.readLine() kb.readLine kb char[] strArr = str.toCharArray(); strArr str.toCharArray() str.toCharArray str for( int i=0; i<strArr.length; i++ ) {
				if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				}	
			} int i=0; int i=0; i 0 i<strArr.length i strArr.length strArr strArr.length i++ i++ i {
				if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				}	
			} {
				if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				}	
			} if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				} 'a'<=strArr[i] && strArr[i]<='z' 'a'<=strArr[i] 'a' strArr[i] strArr i strArr[i]<='z' strArr[i] strArr i 'z' {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() ) System.out.printf System.out System System.out "%s" String.valueOf( strArr[i] ).toUpperCase() String.valueOf( strArr[i] ).toUpperCase String.valueOf( strArr[i] ) String.valueOf String strArr[i] strArr i if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				} 'A'<=strArr[i] && strArr[i]<='Z' 'A'<=strArr[i] 'A' strArr[i] strArr i strArr[i]<='Z' strArr[i] strArr i 'Z' {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() ) System.out.printf System.out System System.out "%s" String.valueOf( strArr[i] ).toLowerCase() String.valueOf( strArr[i] ).toLowerCase String.valueOf( strArr[i] ) String.valueOf String strArr[i] strArr i {
					System.out.printf( "%c", strArr[i] );
				} System.out.printf( "%c", strArr[i] ) System.out.printf System.out System System.out "%c" strArr[i] strArr i System.out.printf( "\n") System.out.printf System.out System System.out "\n" String[] args args
import java.io.*;

class Main {
	public static void main(String[] args) {
		BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
		try {

			String str = kb.readLine();
			char[] strArr = str.toCharArray();
			for( int i=0; i<strArr.length; i++ ) {
				if( 'a'<=strArr[i] && strArr[i]<='z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toUpperCase() );
				} else if( 'A'<=strArr[i] && strArr[i]<='Z' ) {
					System.out.printf( "%s", String.valueOf( strArr[i] ).toLowerCase() );
				} else {
					System.out.printf( "%c", strArr[i] );
				}	
			}
			System.out.printf( "\n");
		} catch( IOException e ) {
			System.err.println( e );
		}
	}
}