Envoyer par SMS: Variational principle for scale-free network motifs