# [Wolfram Language (Mathematica)], 62 bytes #/.Table[#⋂##&@@#~Select~MemberQ@ii||i->Set@$,{i,Max@#}]& [Try it online!][TIO-ky7ua0ow] [Wolfram Language (Mathematica)]: https://www.wolfram.com/wolframscript/ [TIO-ky7ua0ow]: https://tio.run/##y00syUjNTSzJTE78n2b7X1lfLyQxKSc1WvlRd5OyspqDg3JdcGpOanJJnW9qblJqUaBD5vsJ2zNrajJ17YJTSxxUdKozdXwTKxyUa2PV/geWZgLFAooy80qilXXt0hyUY9XqgpMT8@qquaqrDXWMdExqdcC0MZAGkbU6QAljsLCpjhmEC5MH02ApCA2RhFBGOoZGYAlDiEmGYGmwPBYLoIIwIa7a/wA "Wolfram Language (Mathematica) – Try It Online" The private-use character is [`\[VectorLessEqual]`](https://reference.wolfram.com/language/ref/VectorLessEqual.html). ``` Table[ ,{i,Max@#}] for positive i up to the max #/. i->Set@$ remove i if #⋂##&@@ intersection of #~Select~MemberQ@i lists containing i i|| not all <=i ```