I want to thank reader TA for the initial idea that ended up becoming this…