def carre(n):
    for y in range(1,n+1):
        if y == 1 or y == n:
            print( '*' * n )
        else:
            motif = '*' + ' '*(n-2) + '*'
            print( motif )
