Part 2 is basically the same just with 14 chars instead of 4.
Borrow-checker hindered me to keep the same HashSet around all the time and just clear it, so it feels a little inefficient to have a new set every time.