This was actually really hard
334