import random

primeList = []


def primeListGenerator(upperBound):
  global primeList

  for i in range(2, upperBound):
    isPrime = True

    for primeNumber in primeList:
      if i % primeNumber == 0:
        isPrime = False
        break

    if isPrime:
      primeList.append(i)


n = int(input("Fino a "))
primeListGenerator(n)
for n in primeList:
  print(n)
