String Pattern Transformation

Transform a string by repeating each character based on its index position and separating them with hyphens.

Write a Python function that receives a string composed of only lowercase or uppercase English letters and returns the transformed version of the string. The function should transform the string by repeating each character based on its position (0-indexed), with the first letter of each segment being capitalized. Each transformed segment should be separated using hyphens ("-"). ### Parameters - `s` (str): The input string. It is composed only of lower or upper case English letters. ### Return Value - Returns the transformed version of the input string (str). ### Examples ```python # The first character 'a' is repeated once (since its index is 0), # the second character 'b' is repeated twice and so on. The first character of each repetition is capitalized. transform_string("abcd") # Returns "A-Bb-Ccc-Dddd" # Similarly, 'R' is repeated once, 'q' is repeated twice and so on. transform_string("RqaEzty") # Returns "R-Qq-Aaa-Eeee-Zzzzz-Tttttt-Yyyyyyy" # Here, 'c' is repeated once, 'w' is repeated twice and so on. transform_string("cwAt") # Returns "C-Ww-Aaa-Tttt" ```