import java.util.*;

public class e1q78 {

	public static void main(String[] args) {
		
		// Question 7 trace.
		String orig = "AbCDeFaBCDef";
		String second = orig.toLowerCase();
		String s3 = orig.replace("a", "Z");
		String s4 = second.replace("a", "Z");
		String s5 = second;
		second = second.toUpperCase();
		System.out.println(orig+", "+second);
		System.out.println(s3+", "+s4+", "+s5);

		// Question 8 trace.
		int[] vals = {3, 9, 12, 4, 1, 8, 11, 16, 7, 5};
		int[] other = new int[10];
		for (int i=0; i<10; i++)
			other[i] = (vals[i] + vals[(i+1)%10])/2;
		for (int i=0; i<10; i++)
			System.out.print(other[i]+", ");
		System.out.println();
	}
}