def calculate_time_match_fifo(ai, aj, times0=None):
    """
    Associate the times between
    two lists of timestamps using FIFO

    Parameters
    --------------
    ai
        First list of timestamps
    aj
        Second list of timestamps
    times0
        Correspondence between execution times

    Returns
    --------------
    times0
        Correspondence between execution times
    """
    if times0 is None:
        times0 = []
    k = 0
    z = 0
    while k < len(ai):
        while z < len(aj):
            if ai[k] < aj[z]:
                times0.append((ai[k], aj[z]))
                z = z + 1
                break
            z = z + 1
        k = k + 1
    return times0