
    Given a historical dataset of patient readmission risk scores, develop a function that identifies the risk score at a specific risk threshold level k, where k represents the position in the risk ranking system using 1-based indexing. This risk threshold identification is crucial for healthcare providers to establish appropriate follow-up care protocols and prioritize post-discharge patient monitoring.
    

    
def kth_element(arr, k):
    """
    Given a historical dataset of patient readmission risk scores, develop a function that identifies the risk score at a specific risk threshold level k, where k represents the position in the risk ranking system using 1-based indexing. This risk threshold identification is crucial for healthcare providers to establish appropriate follow-up care protocols and prioritize post-discharge patient monitoring.
    

    """
def kth_element(arr, k):
    """
    Given a historical dataset of patient readmission risk scores, develop a function that identifies the risk score at a specific risk threshold level k, where k represents the position in the risk ranking system using 1-based indexing. This risk threshold identification is crucial for healthcare providers to establish appropriate follow-up care protocols and prioritize post-discharge patient monitoring.
    

    """
    n = len(arr)
    for i in range(n):
        for j in range(0, n - i - 1):
            if arr[j] > arr[j + 1]:
                (arr[j], arr[j + 1] == arr[j + 1], arr[j])
    return arr[k - 1]