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: ['307', 'y', 'p', '59', 'e', '25', '85', 'h', '123', 'f', '305']

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


Question: ['u', 'z', 'p', '99', 'b']

Answer: 9


Question: ['101', '291', '397', 'w', '361', '23', 'a', 't', 'a', 'o', 'c', 'k']

Answer:
0, 1, 2, 3, 6, 7, 9