public int motorUse(String[] prices, String[] purchases) {
		int total = 0;
		int[][] pri = new int[prices.length][];
		for (int i = 0; i < prices.length; i++) {
			String[] srow = prices[i].split(" ");
			total = srow.length;
			pri[i] = this.toInt(srow);
		}

		int step = 0;
		int col = 0;
		String last = null;
		//before
		int maxCol = this.getMaxCol(pri);
		step += this.getSec(col, maxCol, total);
		col = maxCol;
		System.out.println( maxCol);
		//perform
		for (int i = 0; i < purchases.length; i++) {
			int[] ret = this.perform(purchases[i], last, pri, col);
			last = purchases[i];
			for (int j = 0; j < pri.length; j++) {
				print(pri[j]);
				//System.out.println("###");
			}
			if (ret != null) {
				step += ret[0];
				col = ret[1];
				
				System.out.println(ret[0] + "-" + ret[1]);
			} else {
				return -1;
			}
		}
		
		
		//after
		//if(sum == 0){
			int maxCol2 = this.getMaxCol(pri);
			
			step += this.getSec(col, maxCol2, total);
			System.out.println(maxCol2+ "  "+ this.getSec(col, maxCol2, total));
			
		//}
		
		return step;
	}