/**
 * Given two dictionaries and two lists, this function merges both dictionaries into one,
 * and concatenates both lists into a single list. Returns the merged dictionary and the concatenated list.
 */
fun mergeDictionariesLists(dict1: Map<String, String>, dict2: Map<String, String>, list1: List<String>, list2: List<String>): Pair<Map<String, String>, List<String>> {

    // Create an empty dictionary to store the merged dictionary
    val mergedDict = mutableMapOf<String, String>()

    // Merge the first dictionary into the merged dictionary
    mergedDict.putAll(dict1)

    // Merge the second dictionary into the merged dictionary
    mergedDict.putAll(dict2)

    // Create an empty list to store the concatenated list
    val concatenatedList = mutableListOf<String>()

    // Concatenate the first list into the concatenated list
    concatenatedList.addAll(list1)

    // Concatenate the second list into the concatenated list
    concatenatedList.addAll(list2)

    return Pair(mergedDict, concatenatedList)
}

val dict1 = mapOf("key1" to "value1", "key2" to "value2")
val dict2 = mapOf("key3" to "value3", "key4" to "value4")
val list1 = listOf("item1", "item2")
val list2 = listOf("item3", "item4")

// Call the mergeDictionariesLists function with the given dictionaries and lists
val mergedDict = mergeDictionariesLists(dict1, dict2, list1, list2)
/**
 * Given two dictionaries and two lists, this function merges both dictionaries into one,
 * and concatenates both lists into a single list. Returns the merged dictionary and the concatenated list.
 */
fun mergeDictionariesLists(dict1: Map<String, String>, dict2: Map<String, String>, list1: List<String>, list2: List<String>): Pair<Map<String, String>, List<String>> {
/**
 * Given two dictionaries and two lists, this function merges both dictionaries into one,
 * and concatenates both lists into a single list. Returns the merged dictionary and the concatenated list.
 */
fun mergeDictionariesLists(dict1: Map<String, String>, dict2: Map<String, String>, list1: List<String>, list2: List<String>): Pair<Map<String, String>, List<String>> {

    // Create an empty dictionary to store the merged dictionary
    val mergedDict = mutableMapOf<String, String>()

    // Merge the first dictionary into the merged dictionary
    mergedDict.putAll(dict1)

    // Merge the second dictionary into the merged dictionary
    mergedDict.putAll(dict2)

    // Create an empty list to store the concatenated list
    val concatenatedList = mutableListOf<String>()

    // Concatenate the first list into the concatenated list
    concatenatedList.addAll(list1)

    // Concatenate the second list into the concatenated list
    concatenatedList.addAll(list2)

    return Pair(mergedDict, concatenatedList)
}

val dict1 = mapOf("key1" to "value1", "key2" to "value2")
val dict2 = mapOf("key3" to "value3", "key4" to "value4")
val list1 = listOf("item1", "item2")
val list2 = listOf("item3", "item4")

// Call the mergeDictionariesLists function with the given dictionaries and lists
val mergedDict = mergeDictionariesLists(dict1, dict2, list1, list2)