solution for SCTF 2023’s Heapster