import math
def is_prime(num) :
for i in range(2, int(math.sqrt(num))+1) :
if num % i == 0 :
return False
return True
if __name__ == "__main__" :
num = raw_input().split(' ')
has_found = 0
begin = 2
while has_found < int(num[0])-1 :
while is_prime(begin) == False :
begin = begin + 1
begin = begin + 1
has_found = has_found + 1
cnt = 1
for has_found in range(int(num[0]), int(num[1])+1) :
while is_prime(begin) == False :
begin = begin + 1
if (cnt % 10 != 0) :
print begin,
else :
print begin
cnt = cnt + 1
begin = begin + 1