/**
 * This exercise requires writing a function that takes in a set of athletes, a number of repetitions, and a name.
 * The function must return a list where the name is repeated multiple times and concatenated with each athlete's name.
 * The number of repetitions should be equal to the number of athletes in the set.
 *
 * Example:
 * Input:
 * - athletes: setOf("John", "Alice", "Mike")
 * - repetitions: 3
 * - name: "Tom"
 *
 * Output:
 * ["Tom John", "Tom Alice", "Tom Mike", "Tom John", "Tom Alice", "Tom Mike", "Tom John", "Tom Alice", "Tom Mike"]
 */
fun tupleConcatenationRepeatAthlete(athletes: Set<String>, repetitions: Int, name: String): List<String> {

    val result = mutableListOf<String>()

    repeat(repetitions) {
        athletes.forEach { athlete ->
            result.add("$name $athlete")
        }
    }

    return result
}
/**
 * This exercise requires writing a function that takes in a set of athletes, a number of repetitions, and a name.
 * The function must return a list where the name is repeated multiple times and concatenated with each athlete's name.
 * The number of repetitions should be equal to the number of athletes in the set.
 *
 * Example:
 * Input:
 * - athletes: setOf("John", "Alice", "Mike")
 * - repetitions: 3
 * - name: "Tom"
 *
 * Output:
 * ["Tom John", "Tom Alice", "Tom Mike", "Tom John", "Tom Alice", "Tom Mike", "Tom John", "Tom Alice", "Tom Mike"]
 */
fun tupleConcatenationRepeatAthlete(athletes: Set<String>, repetitions: Int, name: String): List<String> {
/**
 * This exercise requires writing a function that takes in a set of athletes, a number of repetitions, and a name.
 * The function must return a list where the name is repeated multiple times and concatenated with each athlete's name.
 * The number of repetitions should be equal to the number of athletes in the set.
 *
 * Example:
 * Input:
 * - athletes: setOf("John", "Alice", "Mike")
 * - repetitions: 3
 * - name: "Tom"
 *
 * Output:
 * ["Tom John", "Tom Alice", "Tom Mike", "Tom John", "Tom Alice", "Tom Mike", "Tom John", "Tom Alice", "Tom Mike"]
 */
fun tupleConcatenationRepeatAthlete(athletes: Set<String>, repetitions: Int, name: String): List<String> {

    val result = mutableListOf<String>()

    repeat(repetitions) {
        athletes.forEach { athlete ->
            result.add("$name $athlete")
        }
    }

    return result
}