def make_tnum_to_tax(train_tax_dict, test_tax_dict, tla_to_tnum):
    """
    Make a dict that maps tnums to tax [domain, ..., species]
    
    Arguments:
        train_tax_dict (dict) -- for each genome in the training set, maps tla to tax [domain, ..., species]
        test_tax_dict (dict) -- for each genome in the test set, maps tla to tax [domain, ..., species]
        tla_to_tnum (dict) -- maps tla to tnum
    
    Returns:
        tnum_to_tax (dict) -- maps tnums to tax [domain, ..., species]
    """
    tnum_to_tax = {}
    
    for tla in train_tax_dict:
        tnum = tla_to_tnum[tla]
        tnum_to_tax[tnum] = train_tax_dict[tla]
        
    for tla in test_tax_dict:
        tnum = tla_to_tnum[tla]
        tnum_to_tax[tnum] = test_tax_dict[tla]
    
    return tnum_to_tax