def gen_trials(targets,fillers,rand_li):
    """
    Generate a trial list in which there are some filler sentence(s) between
    2 target sentences.
    
    Parameters
    ----------
    targets   : List
                List of information of each sentence that the research focuses
                on. 4 sorts of information are needed: 1) sentence type ; 2)
                sentence whose words are seperated by spaces; 3) question about
                the sentence; 4)answer of the question. eg.
                ('tt15a',u'野党の 議員が 支持した 官僚には 上流階級出身の 妻が いた。',u'野党の議員は官僚を支えましたか？','j')
            
               
    
    fillers   : List
                List of information of each sentence that is used to prevent 
                the subjects from recognizing the purpose of your experiment, 
                which may affect their performance. eg.
                ('f19',u'激しい 雨が 降ったので 試合は 中止した。',u'試合は雨のため中止でしたか？','j')
    
    rand_li   : List
                A randomly generated list whose elements indicate the positions
                of fillers and targets in the trial list
                
    Returns
    ----------
    trials    : List
                Trial list whose elements would be displayed one by one in the 
                experiment
    
    """
    trials=[]
    for num in rand_li:
        if num==0:
            trials.append(targets.pop())
        else:
            for j in range(num):
                trials.append(fillers.pop())
    return trials