https://lemm.ee/u/conditional_soup