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: ['385', 'b', 'c']

Answer: 3, 5, 8


Question: ['251', '173', '301', '339', '267', 'p', '347']

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


Question: ['495', 't', '453', '375', 'f', 'h', 't', '477']

Answer:
3, 4, 5, 7, 9