We group the numbers $1$ to $18$ in to $3$ groups: those leaving remainder $0$
when divided by $3$; those leaving remainder $1$; and those leaving remainder $2$. Thus
the groups are:
$\{3, 6, 9, 12, 15, 18\}, \{1, 4, 7, 10, 13, 16\}, \{2, 5, 8, 11, 14, 17\}$
Now we put the numbers in such a way that each of the three line segments converging to a vertex gets one number from each set.