wl = "\t\n\r "
def bleach(bs, errors = None):
	out = []
	o = out.extend
	gi = wl.__getitem__
	for ch in bs:
		ch = ord(ch)
		o(map(gi, (ch&3, (ch>>2)&3, (ch>>4)&3, (ch>>6)&3)))
	return ("".join(out), len(bs))

def notbleach(input, errors='strict', filename='<data>', mode=0666):
    return (str(input), len(input))


def unbleach(bs, errors = None):
	while bs and len(bs) % 4: bs = bs[:-1]
	if not bs:
		return (u"", 0)
	out = []
	o = out.append
	gi = wl.index
	n = 0
	acc = idx = 0
	for ch in bs:
		acc += gi(ch) << (2*idx)
		idx += 1
		if idx == 4:
			o(acc)
			n += 1
			idx = acc = 0
	sout = unicode("".join(map(chr, out)))
	return sout, len(bs)

import codecs

class Codec(codecs.Codec):
    def encode(self, input, errors='strict'):
        return bleach(input, errors)
    def decode(self, input, errors='strict'):
        return unbleach(input, errors)

class StreamWriter(Codec, codecs.StreamWriter): pass
class StreamReader(Codec, codecs.StreamReader): pass
def getregentry(): return (notbleach, unbleach, StreamReader, StreamWriter)

if __name__ == "__main__":
	import sys
	input = sys.stdin.read()
	bleached = bleach(input)[0]
	colored = unbleach(bleached)[0]
	if colored != input:
		print >> sys.stderr, "ERROR"
		print >> sys.stderr, colored
		sys.exit(81)
	else:
		print "# -- encoding: bleach --"
		print bleached

