def triangle(n):
    colonnes = 2 * n - 1
    for ligne in range(1,n+1):
        if ligne == 1:
            motif_central = '*'
        else:
            motif_central = motif_central + ' *'

        vide = (colonnes - len( motif_central)) // 2
        motif = vide * ' ' + motif_central + vide * ' '
        print( motif )
