def two_to_ten(n):
f_n = n.split('.')
f2_n = []
for k in f_n:
i = int(k)
f2_n.append((bin(i)[2:]).rjust(8, '0'))
f3 = ''.join(f2_n)
return int(f3,2)
def ten_to_two(m):
m = int(m)
# 确保二进制字符串长度为32位
f1 = bin(m)[2:].zfill(32)
# 将32位二进制字符串分割成每8位一组
f2 = [f1[i:i+8] for i in range(0, 32, 8)]
finall = []
for i in f2:
finall.append(str(int(i, 2))) # 将每个8位二进制字符串转换为十进制
return '.'.join(finall) # 使用点号连接所有十进制数
# 示例
m = 10
print(ten_to_two(m)) # 输出应该是 "0.0.0.10"
n = input().strip()
m = input().strip()
print(two_to_ten(n))
print(ten_to_two(m))