python3 fix
sorted complains on Python3 when the sort order is in fact random. that's not so important on toposort, so we use repr make it shut up.