code: public static int[] setSteps(Last[][][] traceback, int[][][] scores, List<Step> sx, List<Step> sy) {
  		int xMax = scores.length - 1, yMax = scores[xMax].length - 1;
  		boolean linear = (traceback[xMax][yMax].length == 1);
  
  		Last last =
  
  			linear ?
  				traceback[xMax][yMax][0] :
  
  				(scores[xMax][yMax][1] > scores[xMax][yMax][0] &&
  				 scores[xMax][yMax][1] > scores[xMax][yMax][2] ) ?
  
  						Last.DELETION :
  							(scores[xMax][yMax][0] > scores[xMax][yMax][2]) ?
  									Last.SUBSTITUTION :
  									Last.INSERTION;
  
  
  		return setSteps(traceback, false, new int[] {xMax, yMax}, last, sx, sy);
  	}
docs: Find global alignment path through traceback matrix
  @param traceback
  @param scores
  @param sx
  @param sy
  @return