/**
 * This exercise requires appending elements to a list and modifying dictionary items.
 *
 * @param inputList The list to which elements need to be appended.
 * @param inputDict The dictionary whose items need to be modified.
 * @param key The key of the item in the dictionary that needs to be modified.
 * @param value The new value to assign to the modified item.
 * @return Pair<List<Any>, Map<String, Any>> The modified list after appending the new elements and the modified dictionary after replacing the item value.
 */
fun modifyListAndDict(inputList: MutableList<Any>, inputDict: MutableMap<String, Any>, key: String, value: Any): Pair<List<Any>, Map<String, Any>> {

    // Appending elements to the list
    inputList.add(42)
    inputList.add("hello")
    inputList.add(true)

    // Modifying dictionary items
    inputDict[key] = value

    return Pair(inputList, inputDict)
}
/**
 * This exercise requires appending elements to a list and modifying dictionary items.
 *
 * @param inputList The list to which elements need to be appended.
 * @param inputDict The dictionary whose items need to be modified.
 * @param key The key of the item in the dictionary that needs to be modified.
 * @param value The new value to assign to the modified item.
 * @return Pair<List<Any>, Map<String, Any>> The modified list after appending the new elements and the modified dictionary after replacing the item value.
 */
fun modifyListAndDict(inputList: MutableList<Any>, inputDict: MutableMap<String, Any>, key: String, value: Any): Pair<List<Any>, Map<String, Any>> {
/**
 * This exercise requires appending elements to a list and modifying dictionary items.
 *
 * @param inputList The list to which elements need to be appended.
 * @param inputDict The dictionary whose items need to be modified.
 * @param key The key of the item in the dictionary that needs to be modified.
 * @param value The new value to assign to the modified item.
 * @return Pair<List<Any>, Map<String, Any>> The modified list after appending the new elements and the modified dictionary after replacing the item value.
 */
fun modifyListAndDict(inputList: MutableList<Any>, inputDict: MutableMap<String, Any>, key: String, value: Any): Pair<List<Any>, Map<String, Any>> {

    // Appending elements to the list
    inputList.add(42)
    inputList.add("hello")
    inputList.add(true)

    // Modifying dictionary items
    inputDict[key] = value

    return Pair(inputList, inputDict)
}