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

try:
  while (True):
    print (b32encode(stdin.next().strip('\n')))
except StopIteration, e:
  pass
