/**
 * This function takes in three names as input and returns the shortest name.
 * It uses modulus to determine the length of each name and string slicing to extract the shortest one.
 *
 * @param name1 the first name (String)
 * @param name2 the second name (String)
 * @param name3 the third name (String)
 * @return the shortest name among the three (String)
 */
fun getShortestString(name1: String, name2: String, name3: String): String {

    val length1 = name1.length % 10
    val length2 = name2.length % 10
    val length3 = name3.length % 10

    val shortestLength = minOf(length1, length2, length3)

    val shortestName = when (shortestLength) {
        length1 -> name1.substring(0, shortestLength)
        length2 -> name2.substring(0, shortestLength)
        else -> name3.substring(0, shortestLength)
    }

    return shortestName
}
/**
 * This function takes in three names as input and returns the shortest name.
 * It uses modulus to determine the length of each name and string slicing to extract the shortest one.
 *
 * @param name1 the first name (String)
 * @param name2 the second name (String)
 * @param name3 the third name (String)
 * @return the shortest name among the three (String)
 */
fun getShortestString(name1: String, name2: String, name3: String): String {
/**
 * This function takes in three names as input and returns the shortest name.
 * It uses modulus to determine the length of each name and string slicing to extract the shortest one.
 *
 * @param name1 the first name (String)
 * @param name2 the second name (String)
 * @param name3 the third name (String)
 * @return the shortest name among the three (String)
 */
fun getShortestString(name1: String, name2: String, name3: String): String {

    val length1 = name1.length % 10
    val length2 = name2.length % 10
    val length3 = name3.length % 10

    val shortestLength = minOf(length1, length2, length3)

    val shortestName = when (shortestLength) {
        length1 -> name1.substring(0, shortestLength)
        length2 -> name2.substring(0, shortestLength)
        else -> name3.substring(0, shortestLength)
    }

    return shortestName
}