def sol_format(values, n):
    """
    Formats the size of the n biggest SCCs using the format "A,B,C".
    If the number of values is less than n, then the value 0 is used.
    """
    res = [0]*n
    # Get first n values
    for i in range(min(len(values), n)):
      res[i] = values[i][1]

    # Format to string
    s = str(res[0])
    for i in range(1, n):
      s = s  + ",%d" % (res[i])
    return s