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: ['i', 'f', '409', 'c', '83']

Answer: 0, 3, 4, 8, 9


Question: ['n', 'g', 'd']

Answer: -1


Question: ['j', '365', '49', 'b', '123', '71', 'u']

Answer:
1, 2, 3, 4, 5, 6, 7, 9