Added ids for tie-breaking. Fixed sink and swim. This version seems to work correctly.