n = int(input())
b = bin(n)
o = oct(n)
h = hex(n)
space = " "
b1 = len(b)
o1 = len(o)
h1 = len(h)
print((b1-2)*space,"bin", +(b1+o1-3)*space, "oct", +(b1+h1-3)*space, "hex",)
print(space,b, + b1*space, o, +b1*space, h,)

 

75547f8ca9318c533a90ab0cf6c6a05789727949
<mask token>

<mask token>
print((b1 - 2) * space, 'bin', +(b1 + o1 - 3) * space, 'oct', +(b1 + h1 - 3
    ) * space, 'hex')
print(space, b, +b1 * space, o, +b1 * space, h)

n = int(input())
b = bin(n)
o = oct(n)
h = hex(n)
space = ' '
b1 = len(b)
o1 = len(o)
h1 = len(h)
print((b1 - 2) * space, 'bin', +(b1 + o1 - 3) * space, 'oct', +(b1 + h1 - 3
    ) * space, 'hex')
print(space, b, +b1 * space, o, +b1 * space, h)

n = int(input())
b = bin(n)
o = oct(n)
h = hex(n)
space = " "
b1 = len(b)
o1 = len(o)
h1 = len(h)
print((b1-2)*space,"bin", +(b1+o1-3)*space, "oct", +(b1+h1-3)*space, "hex",)
print(space,b, + b1*space, o, +b1*space, h,)

 
