
    Create a function for a learning management system that organizes student assessment scores, where given n recent scores, all below-benchmark performances (negative values) should be grouped before above-benchmark performances (positive values) while maintaining their chronological sequence within each group. The function must preserve the original temporal order of scores within both the below-benchmark and above-benchmark categories to accurately track student progress patterns.
    

    
def re_arrange_array(arr, n):
    """
    Create a function for a learning management system that organizes student assessment scores, where given n recent scores, all below-benchmark performances (negative values) should be grouped before above-benchmark performances (positive values) while maintaining their chronological sequence within each group. The function must preserve the original temporal order of scores within both the below-benchmark and above-benchmark categories to accurately track student progress patterns.
    

    """
def re_arrange_array(arr, n):
    """
    Create a function for a learning management system that organizes student assessment scores, where given n recent scores, all below-benchmark performances (negative values) should be grouped before above-benchmark performances (positive values) while maintaining their chronological sequence within each group. The function must preserve the original temporal order of scores within both the below-benchmark and above-benchmark categories to accurately track student progress patterns.
    

    """
    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