#!/usr/bin/env python
from base64 import *
from sys import *

"""
decodes data from base32.  When encoding and decoding, be cautious of newlines...
"""

try:
  while (True):
    print (b32decode(stdin.next().strip()))
except StopIteration, e:
  pass
