
    Develop a system that analyzes a student's n most recent performance indicators and reorganizes them to group all risk factors (negative values) before protective factors (positive values), while maintaining the chronological sequence within each category to create a clear risk assessment profile. The function should process a list of student performance metrics where negative values indicate risk factors (such as increased absences) and positive values represent protective factors (such as improved grades), and only consider the n most recent indicators in its analysis.
    

    
def re_arrange_array(arr, n):
    """
    Develop a system that analyzes a student's n most recent performance indicators and reorganizes them to group all risk factors (negative values) before protective factors (positive values), while maintaining the chronological sequence within each category to create a clear risk assessment profile. The function should process a list of student performance metrics where negative values indicate risk factors (such as increased absences) and positive values represent protective factors (such as improved grades), and only consider the n most recent indicators in its analysis.
    

    """
def re_arrange_array(arr, n):
    """
    Develop a system that analyzes a student's n most recent performance indicators and reorganizes them to group all risk factors (negative values) before protective factors (positive values), while maintaining the chronological sequence within each category to create a clear risk assessment profile. The function should process a list of student performance metrics where negative values indicate risk factors (such as increased absences) and positive values represent protective factors (such as improved grades), and only consider the n most recent indicators in its analysis.
    

    """
    j = 0
    for i in range(0, n):
        if arr[i] < 0:
            temp = arr[i]
            arr[i] = arr[j]
            arr[j] = temp
            j = j + 1
    return arr