One of the minimal gems of randomness: extracting perfect justice from a biased source without knowing the bias.

The fair coin

Strategist
Chance and uncertainty

Riddle statement

You have a skewed coin, but you don't know how much.

It can come up heads more times than tails, or the other way around; all you know is that its bias is fixed.
You can toss it as many times as you want, but you cannot use any other coin or any other random mechanism.

You must ultimately produce a perfectly fair result: heads or tails, each with probability exactly 1/2.

How would you do it?