So if you have a list of [8, 20, 200, 500, 3, 100], the function should return [200, 200, 500, 500, 100, 100].