object Main extends App{
    def f(n: Int): Unit = {
        g(n, 1)
        if (n == 9) {
            return
        } else {
            f(n + 1)
        }
    }

    def g(i: Int, j: Int): Unit = {
        println(i + "*" + j + "=" + i * j)
        if (j == 9) {
            return
        } else {
            g(i, j + 1)
        }
    }

    f(1)
}