Count the number of letters and numbers that appear in a row and print out this information sequentially.
For example:
ABAACCDB would be 1A1B2A2C1D1B
You were also required to be able to take 1A1B2A2C1D1B and turn it back into it's original form of ABAACCBD.