/**
 * This function takes two lists, lst1 and lst2, and an integer n as input. It returns a new list
 * obtained by concatenating lst1 with itself n times, and then repeating the resulting list
 * lst2 times.
 *
 * @param lst1 The first list to be concatenated and repeated.
 * @param lst2 The second list to be repeated.
 * @param n An integer specifying the number of times lst1 should be concatenated.
 * @return A new list obtained by concatenating lst1 with itself n times, and then repeating the resulting list
 * lst2 times.
 */
fun concatRepeat(lst1: List<Any>, lst2: List<Any>, n: Int): List<Any> {

    val concatenatedList = lst1.flatMap { List(n) { it } }
    val repeatedList = lst2.flatMap { _ -> concatenatedList }
    return repeatedList
}
/**
 * This function takes two lists, lst1 and lst2, and an integer n as input. It returns a new list
 * obtained by concatenating lst1 with itself n times, and then repeating the resulting list
 * lst2 times.
 *
 * @param lst1 The first list to be concatenated and repeated.
 * @param lst2 The second list to be repeated.
 * @param n An integer specifying the number of times lst1 should be concatenated.
 * @return A new list obtained by concatenating lst1 with itself n times, and then repeating the resulting list
 * lst2 times.
 */
fun concatRepeat(lst1: List<Any>, lst2: List<Any>, n: Int): List<Any> {
/**
 * This function takes two lists, lst1 and lst2, and an integer n as input. It returns a new list
 * obtained by concatenating lst1 with itself n times, and then repeating the resulting list
 * lst2 times.
 *
 * @param lst1 The first list to be concatenated and repeated.
 * @param lst2 The second list to be repeated.
 * @param n An integer specifying the number of times lst1 should be concatenated.
 * @return A new list obtained by concatenating lst1 with itself n times, and then repeating the resulting list
 * lst2 times.
 */
fun concatRepeat(lst1: List<Any>, lst2: List<Any>, n: Int): List<Any> {

    val concatenatedList = lst1.flatMap { List(n) { it } }
    val repeatedList = lst2.flatMap { _ -> concatenatedList }
    return repeatedList
}