public static void main(String[] args) {
    Solution solution = new Solution();
    
    String[] startWords = {"hit", "hit", "hit", "hit", "nanny", "catch"},
            endWords = {"cog", "cog", "cog", "cog", "aloud", "choir"};
    List<Set<String>> testCase = getTestCase();
    
    long start = System.currentTimeMillis();
    
    for (Set<String> tc : testCase) {
        int result = solution.ladderLength(startWords[testCase.indexOf(tc)], endWords[testCase.indexOf(tc)], tc);
        
        System.out.println(result);
    }
    
    long end = System.currentTimeMillis();
    
    System.out.printf("time cost: %dms", end - start);
}