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: ['45', 'n', 'u', '199', 'y', 'w']

Answer: 1, 4, 5, 9


Question: ['291', '445', 'q', 't']

Answer: 1, 2, 4, 5, 9


Question: ['g', 'o']

Answer:
-1