def query_planner(where,args):
    """ NB N-gram query planner """
    letters = ['f','s','t']
    letterCombination = ''

    for idx,val in enumerate(where):
        if '=' in where[idx]:
            letterCombination += letters[idx]
        elif 'LIKE' in where[idx] and len(args[idx]) > 1:
            letterCombination = ''.join(letters[:len(where)])
            return '_' + letterCombination + 'f_'
    return '_' + letterCombination + 'f_'