Well you are right, it's too deep but it is. I have changed my program and I used a stack instead of using recursion and this solves my problem.