Write an optimal Python function that takes in a list `A` of numbers and returns a new list, which is the longest valid sublist of `A`.
The spec:
- The output is valid iff abs(x[i+1]-x[i])<10 holds for each `i`.
- The routine should decide which elements to remove, such that the resulting list is *as long as possible*. For example, from [15,0,1] we should remove 15, because the resulting list [0,1] will have two elements. If we kept 15, we would have to remove both 0 and 1, resulting in a shorter list.
- The solution must use dynamic programming to find the optimal solution

Examples:
clean_xd01([0,1,2]) == [0,1,2]  # valid, no need to remove anything
clean_xd01([0,5,-15,5,0]) == [0,5,5,0]  # output is valid with only one element removed
clean_xd01([15,1,2,3]) != [15]  # sub-optimal solution
clean_xd01([15,1,2,3]) == [1,2,3]