NOI 2022 Finals

do note that getchar_unlocked may fail for q3 and q4