public void searchWithWildcards(String query){
        System.out.println("Query: " + query);
        query += '$';
        if (query.indexOf('*') == query.lastIndexOf('*')) {
            int i = 1;
            while (query.indexOf('*') != query.length()-1) {
                query = query.substring(1)+query.substring(0, 1);
                i++;
            }
            query = query.substring(0, query.length()-1);
            printResult(searchWithOneWildcards(query));
        } else {
            printResult(searchWithTwoWildcards(query));
        }
    }