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.

Source: codeforces | Difficulty: EASY
Tags: Implementation


Solutions:
ans = 0
for i in input():
	t = bin(ord(i))[2:][::-1]
	k = int(t + '0' * (8 - len(t)), 2)
	print((ans - k) % 256)
	ans = k


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


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)


s = list(input())
prev = 0
for i in s:
	n = bin(ord(i))[2:]
	n = (8 - len(n)) * '0' + n
	n = n[::-1]
	d = int(n, 2)
	print((prev - d) % 256)
	prev = d


def reverse(b):
	c = ''
	for i in range(1, len(b) + 1):
		c += b[-i]
	return c
p = input()
c = 0
for i in p:
	pp = str(bin(ord(i))[2:])
	for i in range(8 - len(pp)):
		pp = '0' + pp
	k = int(reverse(pp), 2)
	print((c - k) % 256)
	c = k


def ans(sum):
	x = ''
	s = bin(a)
	r = s[2:len(s)]
	g = abs(8 - len(r))
	for i in range(0, g, 1):
		x += '0'
	x += r
	f = ''.join(reversed(x))
	d = int(f, 2)
	return d

def wa(sum, b):
	return (sum - b) % 256
s = str(input())
l = len(s)
x = ''
sum = 0
for i in range(0, l, 1):
	x = s[i]
	a = ord(x)
	b = ans(a)
	c = wa(sum, b)
	print(c)
	sum = b


from sys import stdin
__author__ = 'artyom'
prev = 0
a = []
for c in stdin.readline().strip():
	rev = int(bin(ord(c))[2:].zfill(8)[::-1], 2)
	x = prev - rev if prev >= rev else 256 - rev + prev
	a.append(x)
	prev = rev
for x in a:
	print(x)


s = input()
f = 0
for i in range(len(s)):
	asc = ord(s[i])
	bi = format(asc, '08b')
	bi = bi[::-1]
	sasc = int(bi, 2)
	res = (f - sasc) % 256
	f = sasc
	print(res)


def r(n):
	v = 0
	for i in range(8):
		(n, v) = (n >> 1, (v << 1) + (n & 1))
	return v
s = input()
for i in range(len(s)):
	print((r(ord(s[i - 1]) if i > 0 else 0) - r(ord(s[i]))) % 256)


s = input()
e = 0
for i in s:
	a = ord(i)
	b = format(a, '08b')
	c = str(b)[::-1]
	d = int(c, 2)
	print((e - d) % 256)
	e = d


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 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


def btd(n):
	y = 1
	r = 0
	while n:
		s = n % 10
		r = r + s * y
		n = n // 10
		y = y * 2
	return r
n = input()
p = list(n)
v = 0
for i in p:
	s = ord(i)
	q = bin(s)
	q = q.replace('0b', '')
	q = q[::-1]
	t = len(q)
	q = str(q)
	q = int(q)
	if t < 8:
		t = 8 - t
		q = q * 10 ** t
	w = btd(q)
	print((v - w) % 256)
	v = w


def rev(x, k=None):
	if k == None:
		k = 7
	if k == -1:
		return 0
	return ((x & 1) << k) + rev(x >> 1, k - 1)
S = input()
for i in range(len(S)):
	print((rev(ord(S[i - 1]) if i > 0 else 0) - rev(ord(S[i]))) % 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)


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)


t = input()
f = [0]
for j in range(len(t)):
	a = bin(ord(t[j]))[2:]
	if len(a) < 8:
		a = '0' * (8 - len(a)) + a
	b = int(a[::-1], 2)
	x = (f[-1] - b) % 256
	print(x)
	f.append(b)


line = input()
last = '0' * 8
ci = ''
for e in line:
	ci = bin(ord(e))[2:]
	ci = '0' * (8 - len(ci)) + ci
	print((int(last[::-1], 2) - int(ci[::-1], 2)) % 256)
	last = bin(ord(e))[2:]
	last = '0' * (8 - len(last)) + last


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def decimalToBinary(n):
	return bin(n).replace('0b', '')
s = input()
n = len(s)
p = 0
for i in range(n):
	c = ord(s[i])
	b = decimalToBinary(c)
	l = len(b)
	x = max(0, 8 - l)
	b = '0' * x + b
	b = b[::-1]
	s1 = int(b, 2)
	r = (p - s1) % 256
	print(r)
	p = s1


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)


def rev(x):
	r = 0
	for _ in range(8):
		r = r * 2 + x % 2
		x //= 2
	return r
(a, last) = ([ord(c) for c in str(input())], 0)
for i in a:
	x = rev(i)
	print((last - x) % 256)
	last = x


def reverse(s):
	res = ''
	for i in range(len(s) - 1, -1, -1):
		res += s[i]
	return res

def get_bin(c):
	res = bin(ord(c))[2:]
	res = '0' * (8 - len(res)) + res
	return res
Input = input()
flag = None
for i in Input:
	if flag is None:
		ans = get_bin(i)
		flag = ans
		ans = reverse(ans)
		ans = int(ans, 2)
		ans = (0 - ans + 256) % 256
		print(ans)
	else:
		first = int(reverse(flag), 2)
		third = int(reverse(get_bin(i)), 2)
		for j in range(256):
			if (first - j + 256) % 256 == third:
				print(j)
				break
		flag = get_bin(i)


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


text = str(input())
ans = list()
for j in range(len(text)):
	ch_code_b = bin(ord(text[j]))
	l_ch_code_b = list(ch_code_b)
	second_step = int(0)
	while len(l_ch_code_b) < 10:
		l_ch_code_b.insert(2, 0)
	for i in range(2, len(l_ch_code_b)):
		second_step += int(l_ch_code_b[i]) * pow(2, i - 2)
	if j == 0:
		first_step = 0
	else:
		ch_code_b = bin(ord(text[j - 1]))
		l_ch_code_b = list(ch_code_b)
		first_step = int(0)
		while len(l_ch_code_b) < 10:
			l_ch_code_b.insert(2, 0)
		for i in range(2, len(l_ch_code_b)):
			first_step += int(l_ch_code_b[i]) * pow(2, i - 2)
	ans.append((first_step - second_step) % 256)
for i in ans:
	print(i)


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()


old = 0
for c in input():
	s = bin(ord(c))[2:][::-1]
	now = int(s + '0' * (8 - len(s)), 2)
	print((old - now) % 256)
	old = now


s = input()
mod = 256
prev = 0
for ch in s:
	m = str(''.join(reversed(bin(ord(ch))[2:])))
	if len(m) < 8:
		m += '0' * (8 - len(m))
	m = int(m, 2)
	sa = (prev - m) % mod
	print(sa)
	prev = m


text = input()
n = len(text)
prev_step = 0
for i in range(n):
	char = text[i]
	bit_char = str(bin(ord(char)))[2:]
	ascii_char = '0' * (8 - len(bit_char)) + bit_char
	reverse_ascii_char = ascii_char[::-1]
	reverse_bit_char = '0b' + reverse_ascii_char
	reverse_char = int(reverse_bit_char, 2)
	subbed = (prev_step - reverse_char) % 256
	prev_step = reverse_char
	print(subbed)


k = 0
word = input()
for i in word:
	asci = ord(i)
	s1 = int(bin(asci)[2:].rjust(8, '0')[::-1], base=2)
	s2 = (k - s1) % 256
	k = s1
	print(s2)


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)