Rule 1:

Rule 2: Rule 1

Rule 3: Rules 1 & 2

The end.