Alex, Beatrix, and Clarix each draws a regular polygon. Alex's polygon has 12 sides, Beatrix's has 18 sides, and Clarix's has n sides. If each angle of Beatrix's polygon is the arithmetic mean of an angle from Alex's polygon and an angle from Clarix's polygon, what is n?