import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Pattern;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Pattern p = Pattern.compile("[A-Z]");

		String str = br.readLine();
		char[] upper = str.toUpperCase().toCharArray();
		char[] origin = str.toCharArray();
		for(int i=0; i<origin.length;i++){
			if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			}
		}

		System.out.println(String.valueOf(upper));
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.regex.Pattern; Pattern java.util.regex public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Pattern p = Pattern.compile("[A-Z]");

		String str = br.readLine();
		char[] upper = str.toUpperCase().toCharArray();
		char[] origin = str.toCharArray();
		for(int i=0; i<origin.length;i++){
			if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			}
		}

		System.out.println(String.valueOf(upper));
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Pattern p = Pattern.compile("[A-Z]");

		String str = br.readLine();
		char[] upper = str.toUpperCase().toCharArray();
		char[] origin = str.toCharArray();
		for(int i=0; i<origin.length;i++){
			if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			}
		}

		System.out.println(String.valueOf(upper));
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Pattern p = Pattern.compile("[A-Z]");

		String str = br.readLine();
		char[] upper = str.toUpperCase().toCharArray();
		char[] origin = str.toCharArray();
		for(int i=0; i<origin.length;i++){
			if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			}
		}

		System.out.println(String.valueOf(upper));
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) Pattern p = Pattern.compile("[A-Z]"); p Pattern.compile("[A-Z]") Pattern.compile Pattern "[A-Z]" String str = br.readLine(); str br.readLine() br.readLine br char[] upper = str.toUpperCase().toCharArray(); upper str.toUpperCase().toCharArray() str.toUpperCase().toCharArray str.toUpperCase() str.toUpperCase str char[] origin = str.toCharArray(); origin str.toCharArray() str.toCharArray str for(int i=0; i<origin.length;i++){
			if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			}
		} int i=0; int i=0; i 0 i<origin.length i origin.length origin origin.length i++ i++ i {
			if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			}
		} {
			if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			}
		} if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			} origin[i]==upper[i] origin[i] origin i upper[i] upper i {
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			} if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				} p.matcher(String.valueOf(origin[i])).find() p.matcher(String.valueOf(origin[i])).find p.matcher(String.valueOf(origin[i])) p.matcher p String.valueOf(origin[i]) String.valueOf String origin[i] origin i {
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				} upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0) upper[i] upper i String.valueOf(origin[i]).toLowerCase().charAt(0) String.valueOf(origin[i]).toLowerCase().charAt String.valueOf(origin[i]).toLowerCase() String.valueOf(origin[i]).toLowerCase String.valueOf(origin[i]) String.valueOf String origin[i] origin i 0 System.out.println(String.valueOf(upper)) System.out.println System.out System System.out String.valueOf(upper) String.valueOf String upper String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Pattern p = Pattern.compile("[A-Z]");

		String str = br.readLine();
		char[] upper = str.toUpperCase().toCharArray();
		char[] origin = str.toCharArray();
		for(int i=0; i<origin.length;i++){
			if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			}
		}

		System.out.println(String.valueOf(upper));
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Pattern p = Pattern.compile("[A-Z]");

		String str = br.readLine();
		char[] upper = str.toUpperCase().toCharArray();
		char[] origin = str.toCharArray();
		for(int i=0; i<origin.length;i++){
			if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			}
		}

		System.out.println(String.valueOf(upper));
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Pattern;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Pattern p = Pattern.compile("[A-Z]");

		String str = br.readLine();
		char[] upper = str.toUpperCase().toCharArray();
		char[] origin = str.toCharArray();
		for(int i=0; i<origin.length;i++){
			if(origin[i]==upper[i]){
				if(p.matcher(String.valueOf(origin[i])).find()){
					upper[i] = String.valueOf(origin[i]).toLowerCase().charAt(0);
				}
			}
		}

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