UVa 444 - Encoder and Decoder

Simple but deceiving problem. Input for decryption can be longer than 80 digits.

999999 decrypts to ccc. In encrypting the space is processed.

Also you can have 3 digits like 99120 now if they aren't the given chars like 99 is over 12 ain't a valid one so it is 120.

The above things should solve the problem.