Base32 Encoding

No attempts yetTime limit1sMemory limit256 MB

Problem

Write a program that prints the BASE32 encoding of a string S.

BASE32 encoding runs in this order.

  1. Read S as a sequence of ASCII bytes.
  2. Group the bytes into blocks of 5, starting from the front. Five bytes are 40 bits, and those 40 bits split into eight pieces of 5 bits each.
  3. Each piece holds a value from 0 to 31. Replace it with the character at the same position in the table ABCDEFGHIJKLMNOPQRSTUVWXYZ234567. Value 0 is A, value 25 is Z, value 26 is 2, and value 31 is 7.
  4. If the last block holds fewer than 5 bytes, append zero bits until it is 40 bits long, build the eight characters the same way, then replace the trailing characters with = according to how many bytes were left. One leftover byte turns the last 6 characters into =, two leftover bytes turn the last 4, three turn the last 3, and four turn the last 1.

Input

The first line contains the string S. S consists only of uppercase letters, lowercase letters, and digits, and its length is at least 1 and at most 50.

Output

Print the BASE32 encoding of S on the first line.