In this task, you are given an input list A. You need to extract and sort the unique digits used in the list in ascending order. Return -1 if there is no digit in the list.
--------
Question: ['z', 'g', '311', 'd', 's', 'w']

Answer: 1, 3


Question: ['z', 'z', '273']

Answer: 2, 3, 7


Question: ['89', 'n', '257', 'd', 'g', '283']

Answer:
2, 3, 5, 7, 8, 9