Inefficiently solve p124