public static Pair<Integer> traverse_spiral(int cur_row,int cur_col,int square_len)
	{
		//int col_bound=square_len-1-cur_row;
		//int row_bound=square_len-1-cur_col;
		int midpoint=(square_len-1)/2;
		int next_col=cur_col;
		int next_row=cur_row;
		if(cur_row==square_len/2 && cur_col==midpoint)
		{
			next_col=-1;
			next_row=-1;
		}
		else if (cur_row<=midpoint)
		{
			//left boundary
			if(cur_col<cur_row-1)
			{
				//move upwards
				next_row--;
			}
			else if(cur_col<square_len-1-cur_row)
			{
				//going in the right horizontal direction
				next_col++;
			}
			else if(next_col!=midpoint)//if(cur_col!=square_len-1-cur_row)
			{
				
				//going downside
				next_row++;
			}
			/*else
			{
				next_col=-1;
				next_row=-1;
			}*/
		}
		else
		{
			if(cur_col>cur_row)
			{
				//going downside
				next_row++;
			}
			else if(cur_col>square_len-1-cur_row)
			{
				//going left
				next_col--;
			}
			else
			{
				//going up
				next_row--;
			}
		}
	/*	else if(cur_col==square_len-1-cur_row)
		{
			next_col=-1;
			next_row=-1;
		}
		else if(cur_col<)
		{
			next_row--;
		}
		else
		{
			next_row++;
		}*/
		Pair<Integer> p=new Pair<Integer>(next_row,next_col);
		return p;
	}