python port of Top Four