OpenConsole() RandomSeed(Date()) For i = 1 To 10 inicio.s = "RKR" pieza.s = "QNN" For n = 1 To Len(pieza) posic = Random(Len(inicio)) + 1 inicio = Left(inicio, posic - 1) + Mid(pieza, n, 1) + Right(inicio, Len(inicio) - posic + 1) Next n posic = Random(Len(inicio)) + 1 inicio = Left(inicio, posic - 1) + "B" + Right(inicio, Len(inicio) - posic + 1) posic + 1 + 2 * Int(Random(Len(inicio) - posic) / 2) inicio = Left(inicio, posic - 1) + "B" + Right(inicio, Len(inicio) - posic + 1) PrintN(inicio) Next i PrintN(#CRLF$ + "Press ENTER to exit"): Input() CloseConsole()