import random
a, b = map(int, input().split())
lst = [random.randint(a, b) for _ in range(5)]
print(*lst)
import random
a, b = map(int, input().split())
lst = [random.randint(a, b) for _ in range(5)]
print(*lst)