/**
 * Given an artist name and a list of songs, the function returns the concatenation of the specified song titles using list slicing.
 */
fun stringSliceAndConcatenation(artistName: String, songs: List<String>): String {

    // Extract the first three letters of the artist name
    val artistCode = artistName.take(3)

    // Initialize an empty string for concatenation
    var result = ""

    // Iterate over each song title in the list
    for (song in songs) {
        // Extract the first three letters of the song title
        val songCode = song.take(3)

        // Concatenate the artist code and song code
        val combinedCode = artistCode + songCode

        // Add the combined code to the result string
        result += combinedCode

        // Increase the length of the artist code by 1 for the next song
        artistCode.plus(artistCode.last())
    }

    // Return the final concatenated string
    return result
}
/**
 * Given an artist name and a list of songs, the function returns the concatenation of the specified song titles using list slicing.
 */
fun stringSliceAndConcatenation(artistName: String, songs: List<String>): String {
/**
 * Given an artist name and a list of songs, the function returns the concatenation of the specified song titles using list slicing.
 */
fun stringSliceAndConcatenation(artistName: String, songs: List<String>): String {

    // Extract the first three letters of the artist name
    val artistCode = artistName.take(3)

    // Initialize an empty string for concatenation
    var result = ""

    // Iterate over each song title in the list
    for (song in songs) {
        // Extract the first three letters of the song title
        val songCode = song.take(3)

        // Concatenate the artist code and song code
        val combinedCode = artistCode + songCode

        // Add the combined code to the result string
        result += combinedCode

        // Increase the length of the artist code by 1 for the next song
        artistCode.plus(artistCode.last())
    }

    // Return the final concatenated string
    return result
}