One of the most famous and most dangerous competitions is Crazy Competition. Crazy Competition 2007 will take place in Antarctica and consist of two phases: Summer and Winter. The Summer phase lasts for daysSummer consecutive days and the Winter phase lasts for daysWinter consecutive days. The two phases cannot overlap. You are in charge of scheduling the two phases, and your goal is to maximize the difference between the average temperatures of the two phases (i.e., the average temperature during the Summer phase minus the average temperature during the Winter phase).
You are given the temperatures for every day of a single year in a String. Concatenate the elements of the String into one long string. The i-th character of this string represents the temperature on the i-th day of 2007. The first and last days are not considered consecutive. Characters 'A' through 'Z' represent temperatures -1 through -26. The character '0' (zero) represents the temperature 0. Characters 'a' through 'z' represent temperatures 1 through 26. Return the maximum possible difference between the average temperatures of the two phases.