$S = input(); $str = ''; $arr_S = str_split($S); for($i = 0; isset($arr_S[$i]); $i++): if(ctype_upper($arr_S[$i])): $str += strtolower($arr_S[$i]); elseif(ctype_lower($arr_S[$i])): $str += strtoupper($arr_S[$i]); else: $str += $arr_S[$i]; endif; endfor; print $str;