N = int(input())
N = N - 2
r = N % 2
if r == 1:
    print('7', end='')
else:
    print('1', end='')
q = N // 2
for i in range(q):
    print('1', end='')
print()

f6d8f641a4f434c0b608fad5482b9040599a8f28
<mask token>

<mask token>
if r == 1:
    print('7', end='')
else:
    print('1', end='')
<mask token>
for i in range(q):
    print('1', end='')
print()

N = int(input())
N = N - 2
r = N % 2
if r == 1:
    print('7', end='')
else:
    print('1', end='')
q = N // 2
for i in range(q):
    print('1', end='')
print()
