Given a non-negative decimal integer $x$, convert it to binary representation $b$ of 32 bits. Then, print the result of the following operations to $b$ respecitvely.

* Inversion: change the state of each bit to the opposite state
* Logical left shift: shift left by 1
* Logical right shift: shift right by 1

Constraints

* $0 \leq x \leq 2^{32} - 1$

Input

The input is given in the following format.


$x$


Output

Print the given bits, results of inversion, left shift and right shift in a line respectively.

Examples

Input

8


Output

00000000000000000000000000001000
11111111111111111111111111110111
00000000000000000000000000010000
00000000000000000000000000000100


Input

13


Output

00000000000000000000000000001101
11111111111111111111111111110010
00000000000000000000000000011010
00000000000000000000000000000110

Source: aizu | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
x = int(input())
print('{:032b}'.format(x))
print('{:032b}'.format(~x & 2 ** 32 - 1))
print('{:032b}'.format(x << 1 & 2 ** 32 - 1))
print('{:032b}'.format(x >> 1))


x = int(input())
print(f'{x:032b}')
print(f'{~x & 4294967295:032b}')
print(f'{x << 1 & 4294967295:032b}')
print(f'{x >> 1:032b}')


n = int(input())
mask = (1 << 32) - 1
print('{:032b}'.format(n))
print('{:032b}'.format(~n & mask))
print('{:032b}'.format(n << 1 & mask))
print('{:032b}'.format(n >> 1 & mask))


n = int(input())
print(f'{n:032b}')
print(f'{~n & 4294967295:032b}')
print(f'{n << 1 & 4294967295:032b}')
print(f'{n >> 1:032b}')


n = int(input())
m = (1 << 32) - 1
print('{:032b}'.format(n))
print('{:032b}'.format(~n & m))
print('{:032b}'.format(n << 1 & m))
print('{:032b}'.format(n >> 1))


x = int(input())
y = format(x, 'b').zfill(10)
ly = len(y)
ly = 32 - ly
pady = '0' * ly
print(pady + y)
rev = 2 ** 32 - 1 - x
z = format(rev, 'b').zfill(10)
lz = len(z)
lz = 32 - lz
padz = '0' * lz
print(padz + z)
left = x * 2
if left >= 2 ** 32:
	left -= 2 ** 32
u = format(left, 'b').zfill(10)
lu = len(u)
lu = 32 - lu
padu = '0' * lu
print(padu + u)
right = x // 2
v = format(right, 'b').zfill(10)
lv = len(v)
lv = 32 - lv
padv = '0' * lv
print(padv + v)


x = int(input())
s = '{:032b}'.format(x)
print(s)
print(s.replace('0', '2').replace('1', '0').replace('2', '1'))
print(s[1:] + '0')
print('0' + s[:-1])


x = int(input())
print(format(x, '032b'))
print(format(~x & 4294967295, '032b'))
print(format(x << 1, '032b')[-32:])
print(format(x >> 1, '032b'))


x = int(input())
print('{:032b}'.format(x))
print('{:032b}'.format(~x & 2 ** 32 - 1))
print('{:032b}'.format(x << 1 & 2 ** 32 - 1))
print('{:032b}'.format(x >> 1))


n = int(input())
MASK = (1 << 32) - 1
print('{:032b}'.format(n))
print('{:032b}'.format(~n & MASK))
print('{0:032b}'.format(n << 1 & MASK))
print('{0:032b}'.format(n >> 1 & MASK))


x = int(input())
mask = (1 << 32) - 1
print(f'{x:032b}')
print(f'{~x & mask:032b}')
print(f'{x << 1 & mask:032b}')
print(f'{x >> 1 & mask:032b}')


x = int(input())
BITMASK = (1 << 32) - 1
print('{:032b}'.format(x))
print('{:032b}'.format(~x & BITMASK))
print('{:032b}'.format(x << 1 & BITMASK))
print('{:032b}'.format(x >> 1 & BITMASK))


x = int(input())
print(f'{x:032b}')
print(f'{x:032b}'.translate(str.maketrans('01', '10')))
print(f'{x << 1:032b}'[-32:])
print(f'{x >> 1:032b}')


x = int(input())
bin_x = format(x, '032b')
bin_x1 = format(~x & 4294967295, '032b')
bin_x2 = format(x << 1 & 4294967295, '032b')
bin_x3 = format(x >> 1 & 4294967295, '032b')
print(bin_x)
print(bin_x1)
print(bin_x2)
print(bin_x3)


def run():
	n = int(input())
	fmt = '{:032b}'
	print(fmt.format(n))
	print(fmt.format(~n + 2 ** 32))
	print(fmt.format(n << 1 & ~(1 << 32)))
	print(fmt.format(n >> 1))
run()


def out(n):
	mask = 2 ** 32 - 1
	print(format(n & mask, '032b'))
n = int(input())
out(n)
out(~n)
out(n << 1)
out(n >> 1)


x = int(input())
MASK = (1 << 32) - 1
print('{:032b}'.format(x))
print('{:032b}'.format(~x & MASK))
print('{:032b}'.format(x << 1 & MASK))
print('{:032b}'.format(x >> 1 & MASK))


def main():
	num = int(input())
	b = format(num, '032b')
	bi = format(~num & 4294967295, '032b')
	bl = format(num << 1, '032b')
	br = format(num >> 1, '032b')
	print(b)
	print(bi)
	if len(bl) > 32:
		print(bl[-32:])
	else:
		print(bl)
	print(br)
main()


n = int(input())
print(bin(n)[2:].zfill(32))
print(bin(2 ** 32 - n - 1)[2:].zfill(32))
a = bin(n << 1)[2:].zfill(32)
print(a[-32:])
print(bin(n >> 1)[2:].zfill(32))


x = int(input())
b = ~x & 4294967295
c = x << 1 & 4294967295
d = x >> 1 & 4294967295
print(format(x, '032b'))
print(format(b, '032b'))
print(format(c, '032b'))
print(format(d, '032b'))


b = int(input())
MAX = (1 << 32) - 1
print('{:032b}'.format(b))
print('{:032b}'.format(~b & MAX))
print('{:032b}'.format(b << 1 & MAX))
print('{:032b}'.format(b >> 1 & MAX))


import heapq
from collections import deque
from enum import Enum
import sys
import math
from _heapq import heappush, heappop
import copy
BIG_NUM = 2000000000
MOD = 1000000007
EPS = 1e-09
SIZE = 32
POW = [None] * SIZE
POW[0] = 1
for i in range(1, SIZE):
	POW[i] = POW[i - 1] * 2
x = int(input())
BIT = [0] * SIZE
for i in range(0, SIZE):
	if POW[SIZE - 1 - i] <= x:
		BIT[i] = 1
		x -= POW[SIZE - 1 - i]
for i in range(SIZE):
	print('%d' % BIT[i], end='')
print()
for i in range(SIZE):
	print('%d' % (1 - BIT[i]), end='')
print()
for i in range(1, SIZE):
	print('%d' % BIT[i], end='')
print('0')
print('0', end='')
for i in range(SIZE - 1):
	print('%d' % BIT[i], end='')
print()


n = format(int(input()), '032b')
n_li = list(n)
inversion_n = ['1' if n_li[i] == '0' else '0' for i in range(len(n_li))]
inversion_n = ''.join(inversion_n)
left = n[1:len(n)] + '0'
right = '0' + n[0:len(n) - 1]
print(n)
print(inversion_n)
print(left)
print(right)