def local_maximum(arr):
	n = len(arr)
	prev = arr[0]
	ln = 1 # length of the ascending sublist
	res = [] 
	for i in range(1,n,1):
		if arr[i] >= prev:
			ln += 1
		elif ln > 1:
			res.append(prev)
			ln = 1
		prev = arr[i]
	# take care of the last sublist
	if ln > 1:
		res.append(prev)
	return res
e122c3d3d580de1fcc744cc25ef8221143a11be3
<mask token>

def local_maximum(arr):
    n = len(arr)
    prev = arr[0]
    ln = 1
    res = []
    for i in range(1, n, 1):
        if arr[i] >= prev:
            ln += 1
        elif ln > 1:
            res.append(prev)
            ln = 1
        prev = arr[i]
    if ln > 1:
        res.append(prev)
    return res

def local_maximum(arr):
	n = len(arr)
	prev = arr[0]
	ln = 1 # length of the ascending sublist
	res = [] 
	for i in range(1,n,1):
		if arr[i] >= prev:
			ln += 1
		elif ln > 1:
			res.append(prev)
			ln = 1
		prev = arr[i]
	# take care of the last sublist
	if ln > 1:
		res.append(prev)
	return res