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.

['157', 'k', 'o', 'a', '279', 'g']
1, 2, 5, 7, 9

['u', 'r']
-1

['51', 'w', '267', '297', 'g', 'j', '447', 'm', '497', '289', '497', 'b', '427', '495']

1, 2, 4, 5, 6, 7, 8, 9