There are two types of potions:
"A""B""A" immediately follows a digit, add 1 to the digit."B" immediately follows a digit, subtract 1 from the digit.Create a function that returns a string according to these rules, removing the potions once they've been consumed.
after_potion("3A78B51") ➞ "47751"
# 3 grows to 4, 8 shrinks to 7
after_potion("9999B") ➞ "9998"
after_potion("9A123") ➞ "10123"
after_potion("567") ➞ "567"