def LU(data):
        ld = data[0, :-2]
        d = data[1, :]
        u1 = data[2, 2:]
        u2 = data[3, 4:]
        n = d.shape[0]
        for i in range(2, n):
            ld[i-2] = ld[i-2]/d[i-2]
            d[i] = d[i] - ld[i-2]*u1[i-2]
            if i < n-2:
                u1[i] = u1[i] - ld[i-2]*u2[i-2]