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.

['o', 'k', 'i']
-1

['311', '147', 'a', '149', 'h']
1, 3, 4, 7, 9

['457', 'v', 'd', '197', '407', '239', 'w', 'q', '307', 't', 's', '31', '349', '453', '77']

0, 1, 2, 3, 4, 5, 7, 9