def ans(N):
    if N % 2 == 0:
        if N == 4:
            return "2 4 3 9"
        ret = [2, 4, 3, 9]
        cnt = 4
        summand = 6
        while summand <= 30000 - 6:
            ret.append(summand)
            cnt += 1
            summand += 6
            ret.append(summand)
            if summand > 30000:
                return "over 30000"
            cnt += 1
            summand += 6
            if cnt == N:
                return " ".join(list(map(str, ret)))
        summand = 15
        while summand <= 30000 - 6:
            ret.append(summand)
            cnt += 1
            summand += 6
            ret.append(summand)
            if summand > 30000:
                return "over 30000"
            cnt += 1
            summand += 6
            if cnt == N:
                return " ".join(list(map(str, ret)))
        summand = 8
        while summand <= 30000 - 2:
            ret.append(summand)
            cnt += 1
            summand += 2
            ret.append(summand)
            if summand > 30000:
                return "over 30000"
            cnt += 1
            summand += 4
            if cnt == N:
                return " ".join(list(map(str, ret)))
    else:
        if N == 19999:
            if N == 3:
                return "2 5 63"
            ret = [2, 8, 14]
            cnt = 3
            summand = 3
            while summand < 30000:
                ret.append(summand)
                cnt += 1
                summand += 6
                ret.append(summand)
                # if summand > 30000:
                #     return "over 30000"
                cnt += 1
                summand += 6
                if cnt == N:
                    return " ".join(list(map(str, ret)))
            summand = 12
            while summand <= 30000 - 6:
                ret.append(summand)
                cnt += 1
                summand += 6
                ret.append(summand)
                # if summand > 30000:
                #     return "over 30000"
                cnt += 1
                summand += 6
                if cnt == N:
                    return " ".join(list(map(str, ret)))
            ret.append(30000)
            cnt += 1
            summand = 20
            while summand < 30000:
                ret.append(summand)
                cnt += 1
                summand += 2
                ret.append(summand)
                # if summand > 30000:
                #     return "over 30000"
                cnt += 1
                summand += 4
                if cnt == N:
                    return " ".join(list(map(str, ret)))
            ret.append(4)
            cnt += 1
            if cnt == N:
                return " ".join(list(map(str, ret)))
            ret.append(10)
            cnt += 1
            if cnt == N:
                return " ".join(list(map(str, ret)))
            ret.append(16)
            cnt += 1
            if cnt == N:
                return " ".join(list(map(str, ret)))
        if N == 3:
            return "2 5 63"
        ret = [2, 8, 14]
        cnt = 3
        summand = 3
        while summand < 30000:
            ret.append(summand)
            cnt += 1
            summand += 6
            ret.append(summand)
            # if summand > 30000:
            #     return "over 30000"
            cnt += 1
            summand += 6
            if cnt == N:
                return " ".join(list(map(str, ret)))
        summand = 6
        while summand < 30000:
            ret.append(summand)
            cnt += 1
            summand += 6
            ret.append(summand)
            # if summand > 30000:
            #     return "over 30000"
            cnt += 1
            summand += 6
            if cnt == N:
                return " ".join(list(map(str, ret)))
        summand = 20
        while summand < 30000:
            ret.append(summand)
            cnt += 1
            summand += 2
            ret.append(summand)
            # if summand > 30000:
            #     return "over 30000"
            cnt += 1
            summand += 4
            if cnt == N:
                return " ".join(list(map(str, ret)))
        ret.append(4)
        cnt += 1
        if cnt == N:
            return " ".join(list(map(str, ret)))
        ret.append(10)
        cnt += 1
        if cnt == N:
            return " ".join(list(map(str, ret)))
        ret.append(16)
        cnt += 1
        if cnt == N:
            return " ".join(list(map(str, ret)))
        ret.remove(6)
        cnt += 1
        if cnt == N:
            return " ".join(list(map(str, ret)))


N = int(input())
print(ans(N))


Measured memory_bytes: 5264