Buggy python submission (verdict: Time Limit Exceeded):
import sys
import itertools as it

N = int(input()) 

def prime_judge(N):
    if N % 2 == 0 or N % 3 ==0:
        return False
    for i in range(4,N):
        if N % i == 0:
            return False
            break
    if N % 5 == 1 :
        return True
    else: False

a = []
n = 0
p = 2

while True:
    if prime_judge(p):
        if len(a) == N:
            a_p5 = list(it.combinations(a, 5))
            t_sum = 0
            for a_p5i in a_p5:
                if not(prime_judge(sum(a_p5i))):
                    t_sum += 1
            if t_sum == len(a_p5):
                a = list(a)
                a2 = [str(i) for i in a]
                print(" ".join(a2))
                sys.exit()
        a.append(p)
    p += 1

Fixed submission:
import sys

N = int(input()) 

def prime_judge(N):
    if N % 2 == 0 or N % 3 ==0:
        return False
    for i in range(4,N):
        if N % i == 0:
            return False
            break
    if N % 5 == 1 :
        return True
    else: False

a = []
n = 0
p = 2

while True:
    if prime_judge(p):
        if len(a) == N:
            a2 = [str(i) for i in a]
            print(" ".join(a2))
            sys.exit()
        a.append(p)
    p += 1

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import itertools as it

N = int(input()) 

def prime_judge(N):
    if N % 2 == 0 or N % 3 ==0:
        return False
    for i in range(4,N):
        if N % i == 0:
            return False
            break
    if N % 5 == 1 :
        return True
    else: False

a = []
n = 0
p = 2

while True:
    if prime_judge(p):
        if len(a) >= N:
            a_c = list(it.combinations(a, N-1))
            for a_p in a_c:
                a_p = list(a_p)
                a_p.append(p)
                a_p5 = list(it.combinations(a_p, 5))
                t_sum = 0
                for a_p5i in a_p5:
                    if not(prime_judge(sum(a_p5i))):
                        t_sum += 1
                if t_sum == len(a_p5):
                    a_p = list(a_p)
                    a2 = [str(i) for i in a_p]
                    print(" ".join(a2))
                    sys.exit()
        a.append(p)
    p += 1

Fixed submission:
import sys

N = int(input()) 

def prime_judge(N):
    if N % 2 == 0 or N % 3 ==0:
        return False
    for i in range(4,N):
        if N % i == 0:
            return False
            break
    if N % 5 == 1 :
        return True
    else: False

a = []
n = 0
p = 2

while True:
    if prime_judge(p):
        if len(a) == N:
            a2 = [str(i) for i in a]
            print(" ".join(a2))
            sys.exit()
        a.append(p)
    p += 1

Buggy python submission (verdict: Time Limit Exceeded):
import sys
import itertools as it

N = int(input()) 

def prime_judge(N):
    if N == 2 or N == 3:
        return True
    if N % 2 == 0 or N % 3 ==0:
        return False
    for i in range(4,N):
        if N % i == 0:
            return False
            break
    return True

a = []
n = 0
p = 2

while True:
    if prime_judge(p):
        if len(a) >= N:
            a_c = list(it.combinations(a, N-1))
            for a_p in a_c:
                a_p = list(a_p)
                a_p.append(p)
                a_p5 = list(it.combinations(a_p, 5))
                t_sum = 0
                for a_p5i in a_p5:
                    if not(prime_judge(sum(a_p5i))):
                        t_sum += 1
                if t_sum == len(a_p5):
                    a_p = list(a_p)
                    a2 = [str(i) for i in a_p]
                    print(" ".join(a2))
                    sys.exit()
        a.append(p)
    p += 1

Fixed submission:
import sys

N = int(input()) 

def prime_judge(N):
    if N % 2 == 0 or N % 3 ==0:
        return False
    for i in range(4,N):
        if N % i == 0:
            return False
            break
    if N % 5 == 1 :
        return True
    else: False

a = []
n = 0
p = 2

while True:
    if prime_judge(p):
        if len(a) == N:
            a2 = [str(i) for i in a]
            print(" ".join(a2))
            sys.exit()
        a.append(p)
    p += 1