Write a function that takes a list of integers and returns a new list with consecutive duplicate values removed. Only duplicates that are adjacent should be collapsed; non-consecutive repeats should be kept. Examples: - [1, 1, 2, 2, 3] -> [1, 2, 3] - [1, 2, 1] -> [1, 2, 1] Implement the function solve(lst) that returns the filtered list.
([1, 1, 2, 2, 2, 3, 1, 1],)[1, 2, 3, 1]