def search(x, thing):
    """Search for x in thing.  True iff found.  Utility used only
    for tests in this file."""

    if isinstance(thing, dict):
        for y in thing.values():
            if search(x, y):
                return True
    elif isinstance(thing, list):
        for y in thing:
            if search(x, y):
                return True
    else:
        return x == thing