Still working on it...

I need to cast the main, right, and beneath variables as tuples in order to compare their elements.