def sort_array(arr):
    odds = sorted([x for x in arr if x % 2 != 0])
    
    odd = 0
    result = []
    for x in arr:
        if x % 2 != 0:
            result.append(odds[odd])
            odd += 1
        else:
            result.append(x)
            
    return result
    
print(sort_array([9, 8, 7, 6, 5, 4, 3, 2, 1, 0]))
