findLastTail (t1:t2:ts) = do (Tail na) <- getObjectAttribute t1
                             (Tail nb) <- getObjectAttribute t2
                             if (na > nb)
                                then findLastTail (t1:ts)
                                else findLastTail (t2:ts)
findLastTail (t1:t2:ts) = do (Tail na) <- getObjectAttribute t1
                             (Tail nb) <- getObjectAttribute t2
                             if (na > nb)
                                then findLastTail (t1:ts)
                                else findLastTail (t2:ts)
findLastTail (t1:t2:ts) = do (Tail na) <- getObjectAttribute t1
                             (Tail nb) <- getObjectAttribute t2
                             if (na > nb)
                                then findLastTail (t1:ts)
                                else findLastTail (t2:ts)