The way it performs, this algorithm must be O(N^N^N^N^N^N)