Interestingly, while completing the last step of the assignment I found that I kept getting "A_24_P99984" returned to me instead of "A_24_P945408". Using a less command I found this:
As you can see, the data isn't sorting properly. This was using sort -k 1 -r -n (put in all sort of alignments), and after troubleshooting I added -t $'\t' as well, but nothing seems to change it. As you can see, it sorts by number: from left to right, and assuming null/nonexistent digits are higher, placing overall smaller numbers out of order.
If anyone has any idea on why -n seems to be giving this result, I'd appreciate the advice! Trying to look it up just got me advice to use -n, which... is not helpful.