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: ['291', '445', 'q', 't']

Answer: 1, 2, 4, 5, 9


Question: ['t', 'p', 'u', 'a']

Answer: -1


Question: ['157', '345', '269', 'p', 'h', '183', 'x', 'i', '371', '43', '347']

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