import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String output = "";
		String[] mozi = input.split(" ");
		String UpperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		String LowerAlpha = "abcdefghijklmnopqrstuvwxyz";
		int mozi_length = 0;

		int index1 = -1;
		int index2 = -1;
		for (int i = 0; i < mozi.length; i++) {
			mozi_length += mozi[i].length();
			if (i != 0) {
				output += " ";
			}
			for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			}
		}
		if (mozi_length < 1200) {
			System.out.println(output);
		}
	}

}
 import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String output = "";
		String[] mozi = input.split(" ");
		String UpperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		String LowerAlpha = "abcdefghijklmnopqrstuvwxyz";
		int mozi_length = 0;

		int index1 = -1;
		int index2 = -1;
		for (int i = 0; i < mozi.length; i++) {
			mozi_length += mozi[i].length();
			if (i != 0) {
				output += " ";
			}
			for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			}
		}
		if (mozi_length < 1200) {
			System.out.println(output);
		}
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String output = "";
		String[] mozi = input.split(" ");
		String UpperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		String LowerAlpha = "abcdefghijklmnopqrstuvwxyz";
		int mozi_length = 0;

		int index1 = -1;
		int index2 = -1;
		for (int i = 0; i < mozi.length; i++) {
			mozi_length += mozi[i].length();
			if (i != 0) {
				output += " ";
			}
			for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			}
		}
		if (mozi_length < 1200) {
			System.out.println(output);
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String output = "";
		String[] mozi = input.split(" ");
		String UpperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		String LowerAlpha = "abcdefghijklmnopqrstuvwxyz";
		int mozi_length = 0;

		int index1 = -1;
		int index2 = -1;
		for (int i = 0; i < mozi.length; i++) {
			mozi_length += mozi[i].length();
			if (i != 0) {
				output += " ";
			}
			for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			}
		}
		if (mozi_length < 1200) {
			System.out.println(output);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc String output = ""; output "" String[] mozi = input.split(" "); mozi input.split(" ") input.split input " " String UpperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; UpperAlpha "ABCDEFGHIJKLMNOPQRSTUVWXYZ" String LowerAlpha = "abcdefghijklmnopqrstuvwxyz"; LowerAlpha "abcdefghijklmnopqrstuvwxyz" int mozi_length = 0; mozi_length 0 int index1 = -1; index1 -1 1 int index2 = -1; index2 -1 1 for (int i = 0; i < mozi.length; i++) {
			mozi_length += mozi[i].length();
			if (i != 0) {
				output += " ";
			}
			for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			}
		} int i = 0; int i = 0; i 0 i < mozi.length i mozi.length mozi mozi.length i++ i++ i {
			mozi_length += mozi[i].length();
			if (i != 0) {
				output += " ";
			}
			for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			}
		} {
			mozi_length += mozi[i].length();
			if (i != 0) {
				output += " ";
			}
			for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			}
		} mozi_length += mozi[i].length() mozi_length mozi[i].length() mozi[i].length mozi[i] mozi i if (i != 0) {
				output += " ";
			} i != 0 i 0 {
				output += " ";
			} output += " " output " " for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			} int j = 0; int j = 0; j 0 j < mozi[i].length() j mozi[i].length() mozi[i].length mozi[i] mozi i j++ j++ j {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			} {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			} index1 = UpperAlpha.indexOf(mozi[i].charAt(j)) index1 UpperAlpha.indexOf(mozi[i].charAt(j)) UpperAlpha.indexOf UpperAlpha mozi[i].charAt(j) mozi[i].charAt mozi[i] mozi i j index2 = LowerAlpha.indexOf(mozi[i].charAt(j)) index2 LowerAlpha.indexOf(mozi[i].charAt(j)) LowerAlpha.indexOf LowerAlpha mozi[i].charAt(j) mozi[i].charAt mozi[i] mozi i j if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				} index1 == -1 && index2 == -1 index1 == -1 index1 -1 1 index2 == -1 index2 -1 1 {
					output += "" + mozi[i].charAt(j);
				} output += "" + mozi[i].charAt(j) output "" + mozi[i].charAt(j) "" mozi[i].charAt(j) mozi[i].charAt mozi[i] mozi i j if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				} index1 != -1 index1 -1 1 {
					output += "" + LowerAlpha.charAt(index1);

				} output += "" + LowerAlpha.charAt(index1) output "" + LowerAlpha.charAt(index1) "" LowerAlpha.charAt(index1) LowerAlpha.charAt LowerAlpha index1 if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				} index2 != -1 index2 -1 1 {
					output += "" + UpperAlpha.charAt(index2);
				} output += "" + UpperAlpha.charAt(index2) output "" + UpperAlpha.charAt(index2) "" UpperAlpha.charAt(index2) UpperAlpha.charAt UpperAlpha index2 if (mozi_length < 1200) {
			System.out.println(output);
		} mozi_length < 1200 mozi_length 1200 {
			System.out.println(output);
		} System.out.println(output) System.out.println System.out System System.out output String[] args args public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String output = "";
		String[] mozi = input.split(" ");
		String UpperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		String LowerAlpha = "abcdefghijklmnopqrstuvwxyz";
		int mozi_length = 0;

		int index1 = -1;
		int index2 = -1;
		for (int i = 0; i < mozi.length; i++) {
			mozi_length += mozi[i].length();
			if (i != 0) {
				output += " ";
			}
			for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			}
		}
		if (mozi_length < 1200) {
			System.out.println(output);
		}
	}

} public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String output = "";
		String[] mozi = input.split(" ");
		String UpperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		String LowerAlpha = "abcdefghijklmnopqrstuvwxyz";
		int mozi_length = 0;

		int index1 = -1;
		int index2 = -1;
		for (int i = 0; i < mozi.length; i++) {
			mozi_length += mozi[i].length();
			if (i != 0) {
				output += " ";
			}
			for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			}
		}
		if (mozi_length < 1200) {
			System.out.println(output);
		}
	}

} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String output = "";
		String[] mozi = input.split(" ");
		String UpperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		String LowerAlpha = "abcdefghijklmnopqrstuvwxyz";
		int mozi_length = 0;

		int index1 = -1;
		int index2 = -1;
		for (int i = 0; i < mozi.length; i++) {
			mozi_length += mozi[i].length();
			if (i != 0) {
				output += " ";
			}
			for (int j = 0; j < mozi[i].length(); j++) {
				index1 = UpperAlpha.indexOf(mozi[i].charAt(j));
				index2 = LowerAlpha.indexOf(mozi[i].charAt(j));
				if (index1 == -1 && index2 == -1) {
					output += "" + mozi[i].charAt(j);
				} else if (index1 != -1) {
					output += "" + LowerAlpha.charAt(index1);

				} else if (index2 != -1) {
					output += "" + UpperAlpha.charAt(index2);
				}

			}
		}
		if (mozi_length < 1200) {
			System.out.println(output);
		}
	}

}

