Chaotic-periodic transition in a two-sided minority game