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: ['y', '101', 'g', 'c', 'z']

Answer: 0, 1


Question: ['z', '271', 'h', 'm', '365']

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


Question: ['471', 'a']

Answer:
1, 4, 7