/**
 * This function takes two integers as input and returns a tuple with nested tuples, each containing pairs of numbers from 1 to the respective input numbers.
 *
 * @param n An integer representing the first range of numbers (1 to n).
 * @param m An integer representing the second range of numbers (1 to m).
 * @return A tuple with nested tuples, each containing two numbers from 1 to n and 1 to m respectively.
 *
 * Example:
 * createTuples(3, 2) -> ((1, 1), (1, 2), (2, 1), (2, 2), (3, 1), (3, 2))
 */
fun createTuples(n: Int, m: Int): List<Pair<Int, Int>> {

    val result = mutableListOf<Pair<Int, Int>>()
    for (i in 1..n) {
        for (j in 1..m) {
            result.add(Pair(i, j))
        }
    }
    return result
}
/**
 * This function takes two integers as input and returns a tuple with nested tuples, each containing pairs of numbers from 1 to the respective input numbers.
 *
 * @param n An integer representing the first range of numbers (1 to n).
 * @param m An integer representing the second range of numbers (1 to m).
 * @return A tuple with nested tuples, each containing two numbers from 1 to n and 1 to m respectively.
 *
 * Example:
 * createTuples(3, 2) -> ((1, 1), (1, 2), (2, 1), (2, 2), (3, 1), (3, 2))
 */
fun createTuples(n: Int, m: Int): List<Pair<Int, Int>> {
/**
 * This function takes two integers as input and returns a tuple with nested tuples, each containing pairs of numbers from 1 to the respective input numbers.
 *
 * @param n An integer representing the first range of numbers (1 to n).
 * @param m An integer representing the second range of numbers (1 to m).
 * @return A tuple with nested tuples, each containing two numbers from 1 to n and 1 to m respectively.
 *
 * Example:
 * createTuples(3, 2) -> ((1, 1), (1, 2), (2, 1), (2, 2), (3, 1), (3, 2))
 */
fun createTuples(n: Int, m: Int): List<Pair<Int, Int>> {

    val result = mutableListOf<Pair<Int, Int>>()
    for (i in 1..n) {
        for (j in 1..m) {
            result.add(Pair(i, j))
        }
    }
    return result
}