Cynthia paints each region of the figure in a single color: red, blue or yellow. She paints with different colors the regions that touch each other. In how many different ways can Cyntia paint the figure?