public void StackFllow(Level[] maze, TermS startPoint)
	{
		boolean found=false;
		path.push(startPoint);
		while(!path.isEmpty() && !found)
		{
			    TermS term=(TermS)path.top();
		//	    System.out.println(term.getPositionI());
		//	    System.out.println(term.getPositionJ());
		//	    System.out.println(term.getLevel());
				char[][]map=maze[term.getLevel()].getLevel();
				if(checkPositionChar(map, term)==1)
				{
					found=true;
				}
				else
				{
					if(validation[term.getLevel()]==null)
					{
						creatBooleanMap(term, map);
					}
					byte[] limites =getTheLimites(map.length,term.getPositionI(), term.getPositionJ());
					if(chooseTheCell(limites,validation[term.getLevel()] ,term))
					{
						//for(int i=0;i<validation[term.getLevel()].length;i++)
						{
							//for(int j= 0 ;j <validation[term.getLevel()].length;j++)
							{
								//System.out.print(validation[term.getLevel()][i][j]);
								//System.out.print(" ");
							}
							//System.out.println();
						}
						
						//System.out.println("found");
						//TermS term1=(TermS)path.top();
						//System.out.println(term1.getLevel());
						//System.out.println(term1.getPositionI()+"    "+ term1.getPositionJ());
					}
					else if(!chooseTheCell(limites,validation[term.getLevel()] ,term))
					{
						if(checkPositionChar(map,term) == 0)
						{
							int nextLevel =Integer.parseInt(""+map[term.getPositionI()][term.getPositionJ()]);
							try
							{
								if(maze[nextLevel]!=null)
								{
									
									System.out.println("stair");
									String[] stairs=maze[nextLevel].getStairs();
									String positions=stairs[term.getLevel()];
									int posI=Integer.parseInt(positions.substring(0,positions.indexOf(' ')));
									int posJ=Integer.parseInt(positions.substring(positions.indexOf(' ')+1,positions.length()));
									TermS newTerm = new TermS (posI , posJ);
									term.setDirection(' ');
									newTerm.setLevel(nextLevel);
									map[term.getPositionI()][term.getPositionJ()]='x';
									//maze[nextLevel].getLevel()[posI][posJ]='x';
									path.push(newTerm);
									TermS term1=(TermS)path.top();
									System.out.println(term1.getLevel());
									System.out.println(term1.getPositionI()+"    "+ term1.getPositionJ());
									String x=term1.getPositionI()+"    "+ term1.getPositionJ();
									//if(x.equalsIgnoreCase("18    8"))
									//{
									//	System.out.println("sdjjods");
									//}
								}
								else
								{
								//	System.out.println("pop");
									path.pop();
								}
							}
						   catch(Exception e)
						   {
							System.out.println("error");
						   }
						}
						else
						{
							path.pop();
						}
					}
					else
					{
						path.pop();
					}
				}
			
		}
	
	}