This is only theoretical assuming infinite memory. This will run out of memory also horribly optimized, i would encode but lazy