public ArrayList<ArrayList<String>> partition(String s) {
		ArrayList<ArrayList<String>> rows = new ArrayList<ArrayList<String>>();
		ArrayList<String> row = new ArrayList<String>();
		int len = s.length();
		if (len == 0 || len == 1){
			row.add(s);
			rows.add(row);
		}
		Set<String> dict = getPalindromes(s);
		
//		String s2 = "$" + s;
//		len = len+1;
//		boolean[] possible = new boolean[len];
//		possible[0] = true;
		
		for (int i = 0; i < len; i++) {
			for (int j = i; j >=0; j--) {
				if (dict.contains(s.substring(j, i+1))){
					
				}
				
			}
			
			rows.add(row);
		}
		
		return rows;
    }