import re


def parse_food(line:str) -> tuple[list[str], list[str]]:
    """Get the lists of ingredients and allergens from a food description"""
    ingredients = []
    allergens = []

    containsFound = False
    for word in re.findall("\w+", line):
        if word == "contains":
            containsFound = True
        elif containsFound:
            allergens.append(word)
        else:
            ingredients.append(word)
    
    return ingredients, allergens