Birchbox algorithm solved in ~5minutes