for i in range(0, len(slist)):
    ind1 = (DISPLACE1+i) % TOTAL_PTEXTS
    ind2 = TOTAL_PTEXTS + (DISPLACE2 + i) % TOTAL_PTEXTS
    f1 = open("ptext" + str(ind1), "r")
    p1 = f1.readline()
    f1.close()
    f2 = open("ptext" + str(ind2), "r")
    p2 = f2.readline()
    f2.close()
    
    k = []
    for j in range(600):
        k.append(random.randint(0, 255))
    c1_array = []
    c2_array = []
    for j in range(600):
        c1_array.append((ord(p1[j]) ^ k[j]))
        c2_array.append((ord(p2[j]) ^ k[j]))
    f1 = open("citext" + str(i), "wb")
    f1.write(bytes(c1_array))
    f1.close()
    f2 = open("citext" + str(i+len(slist)), "wb")
    f2.write(bytes(c2_array))
    f2.close()
