This is highly manual, so not sure if you are looking for a more automated sorting approch:
abc[,2] <- rep(rep(1:4, each = 2), length.out = nrow(abc))
abc[,3] <- rep(c(rep(1:2, 2), rep(3:4, 2)), length.out = nrow(abc))
gives:
[,1] [,2] [,3]
[1,] 1 1 1
[2,] 1 1 2
[3,] 1 2 1
[4,] 1 2 2
[5,] 1 3 3
[6,] 1 3 4
[7,] 1 4 3
[8,] 1 4 4
[9,] 1 1 1
[10,] 1 1 2
[11,] 1 2 1
[12,] 1 2 2
[13,] 1 3 3
[14,] 1 3 4
[15,] 1 4 3
[16,] 1 4 4
[17,] 2 1 1
[18,] 2 1 2
[19,] 2 2 1
[20,] 2 2 2
[21,] 2 3 3
[22,] 2 3 4
[23,] 2 4 3
[24,] 2 4 4
[25,] 2 1 1
[26,] 2 1 2
[27,] 2 2 1
[28,] 2 2 2
[29,] 2 3 3
[30,] 2 3 4
[31,] 2 4 3
[32,] 2 4 4
[33,] 3 1 1
[34,] 3 1 2
[35,] 3 2 1
[36,] 3 2 2
[37,] 3 3 3
[38,] 3 3 4
[39,] 3 4 3
[40,] 3 4 4
[41,] 3 1 1
[42,] 3 1 2
[43,] 3 2 1
[44,] 3 2 2
[45,] 3 3 3
[46,] 3 3 4
[47,] 3 4 3
[48,] 3 4 4
[49,] 4 1 1
[50,] 4 1 2
[51,] 4 2 1
[52,] 4 2 2
[53,] 4 3 3
[54,] 4 3 4
[55,] 4 4 3
[56,] 4 4 4
[57,] 4 1 1
[58,] 4 1 2
[59,] 4 2 1
[60,] 4 2 2
[61,] 4 3 3
[62,] 4 3 4
[63,] 4 4 3
[64,] 4 4 4