INTERCAL is the oldest of esoteric programming languages. One of its many weird features is the method of character-based output, known as Turing Tape method. It converts an array of unsigned 8-bit integers into a sequence of characters to print, using the following method.

The integers of the array are processed one by one, starting from the first. Processing i-th element of the array is done in three steps:

1. The 8-bit binary notation of the ASCII-code of the previous printed character is reversed. When the first element of the array is processed, the result of this step is considered to be 0.

2. The i-th element of the array is subtracted from the result of the previous step modulo 256.

3. The binary notation of the result of the previous step is reversed again to produce ASCII-code of the i-th character to be printed.

You are given the text printed using this method. Restore the array used to produce this text.

Input

The input will consist of a single line text which contains the message printed using the described method. String text will contain between 1 and 100 characters, inclusive. ASCII-code of each character of text will be between 32 (space) and 126 (tilde), inclusive.

Output

Output the initial array, which was used to produce text, one integer per line.

Examples

Input

Hello, World!


Output

238
108
112
0
64
194
48
26
244
168
24
16
162

Note

Let's have a closer look at the beginning of the example. The first character is "H" with ASCII-code 72 = 010010002. Its reverse is 000100102 = 18, and this number should become the result of the second step of processing. The result of the first step is considered to be 0, so the first element of the array has to be (0 - 18) mod 256 = 238, where a mod b is the remainder of division of a by b.

Difficulty: EASY

Solutions:
def obin(a):
	a = ord(a)
	text = bin(a)[bin(a).find('1'):]
	ntext = '0' * (8 - len(text)) + text
	return ntext

def rev(a):
	return a[-1::-1]

def revascii(char):
	return int(rev(obin(char)), base=2)
text = input()
for i in range(len(text)):
	if i == 0:
		lastele = 0
	else:
		lastele = revascii(text[i - 1])
	print((lastele - revascii(text[i])) % 256)


a = input()
l = len(a)
b = []
k = 0
for i in range(l):
	p = bin(ord(a[i]))[2:]
	q = len(p)
	while q < 8:
		p = '0' + p
		q += 1
	p = p[::-1]
	p = int(p, 2)
	x = (k - p) % 256
	b.append(x)
	k = p
for i in b:
	print(i)


def f(x):
	return int(format(256 + x, 'b')[::-1][:-1], 2)
(t, x) = (input(), 0)
for i in t:
	y = f(ord(i))
	print((x - y) % 256)
	x = y


text = input()
text_ords = [ord(x) for x in text]
prev_res = 0
for c in text_ords:
	list_rev_bin = list(reversed('0' * (8 - len(bin(c)) + 2) + bin(c)[2:]))
	desired_num = int(''.join(list_rev_bin), base=2)
	print((prev_res - desired_num + 256) % 256)
	prev_res = desired_num


n = input()
prev = 0
for i in n:
	asci = ord(i)
	binary = format(asci, '#010b')[2:][::-1]
	num = int(binary, 2)
	print((prev - num) % 256)
	prev = num


def f(x):
	a = bin(x)[2:]
	b = '0' * (8 - len(a)) + a
	return int(b[::-1], 2)
rev = [0] * 260
for i in range(257):
	rev[i] = f(i)
x = input()
k = [0]
for i in x:
	k.append(ord(i))
for i in range(len(x)):
	print((f(k[i]) - f(k[i + 1])) % 256)


(x, f) = (input(), 0)
for i in x:
	h = bin(ord(i))[2:]
	h = ('0' * (8 - len(h)) + h)[::-1]
	print((f - int(h, 2)) % 256)
	f = int(h, 2)


s = input()
A = []
A.append(0)
for i in s:
	codigo = ord(i)
	sCodigo = bin(codigo).lstrip('0b')
	sCodigo = sCodigo.rjust(8, '0')
	sCodigo = sCodigo[::-1]
	x = int(sCodigo, 2)
	A.append(x)
size = len(s)
for i in range(0, size):
	print((A[i] - A[i + 1]) % 256)


import sys
import math
stra = str(input())
scar = [ord(stra[int(i)]) for i in range(len(stra))]
val = []
(k, ans, kaa) = (0, 0, 0)
for i in range(len(scar)):
	s = ''
	while scar[i] != 0:
		s += str(scar[i] & 1)
		scar[i] >>= 1
	if len(s) < 8:
		s += '0' * (8 - len(s))
	kaa = int(s, 2)
	val.append(kaa)
	ans = (k - val[-1]) % 256
	print((k - val[-1]) % 256)
	k = int(s, 2)


def get_input():
	inpt = input()
	return inpt

def main():
	inpt = get_input()
	prev = 0
	for i in inpt:
		bin_chr = format(ord(i), '08b')
		rev_bin = bin_chr[::-1]
		rev_num = int(rev_bin, 2)
		new_num = (prev - rev_num) % 256
		prev = rev_num
		print(new_num)
main()


def sum_pow(n):
	mem = [1]
	for i in range(8):
		mem.append(n * mem[i])
	return mem
(mem, pre) = (sum_pow(2), 0)
for i in input():
	(asc, sum, c) = (ord(i), 0, 7)
	while asc != 0:
		sum += asc % 2 * mem[c]
		asc //= 2
		c -= 1
	print((pre - sum) % 256)
	pre = sum