Collision of three balls on a plane