
def PGBoiteuse():
    n = int(input("n? "))
    nombre = 1
    pasRestants = 1
    direction = 1
    for j in range(1, n+1):
        print(nombre, " ", sep="", end="")
        nombre += direction
        pasRestants -= 1
        direction += 1
        if pasRestants == 0:
            direction = 2
            pasRestants = 2
    print()

PGBoiteuse()