def METHOD_NAME(lineinfo, maxcat):
    filename = gscript.tempfile()
    with open(filename, "w") as fout:
        for arccat in lineinfo:
            for cat in range(1, maxcat):
                pointcat = arccat * 10000 + cat
                fout.write("%d %d %d\n" % (arccat, pointcat, pointcat + 1))
    return filename