Adding solution for coin flip simulation.