/**
 * A fashion designer has a list of clothing patterns and they want to find a specific pattern 
 * from the given list. Write a function that takes a list of patterns and a search list as inputs. 
 * The function should return the pattern found from the search list, or "Pattern not found!" if 
 * the pattern is not present in the search list.
 *
 * Examples:
 * ---------
 * findMatchingPattern(listOf("Floral", "Stripes", "Polka dots", "Plaid"), listOf("Geometric", "Floral", "Stripes"))
 * Output: "Floral"
 *
 * findMatchingPattern(listOf("Solid color", "Checked", "Houndstooth", "Tartan"), listOf("Plaid", "Houndstooth", "Jacquard"))
 * Output: "Houndstooth"
 * 
 * findMatchingPattern(listOf("Animal print", "Argyle", "Paisley", "Camouflage"), listOf("Leopard", "Tropical", "Jacquard"))
 * Output: "Pattern not found!"
 */
fun findMatchingPattern(patterns: List<String>, searchList: List<String>): String {

    for (pattern in patterns) {
        for (item in searchList) {
            if (pattern == item) {
                return pattern
            }
        }
    }
    return "Pattern not found!"
}
/**
 * A fashion designer has a list of clothing patterns and they want to find a specific pattern 
 * from the given list. Write a function that takes a list of patterns and a search list as inputs. 
 * The function should return the pattern found from the search list, or "Pattern not found!" if 
 * the pattern is not present in the search list.
 *
 * Examples:
 * ---------
 * findMatchingPattern(listOf("Floral", "Stripes", "Polka dots", "Plaid"), listOf("Geometric", "Floral", "Stripes"))
 * Output: "Floral"
 *
 * findMatchingPattern(listOf("Solid color", "Checked", "Houndstooth", "Tartan"), listOf("Plaid", "Houndstooth", "Jacquard"))
 * Output: "Houndstooth"
 * 
 * findMatchingPattern(listOf("Animal print", "Argyle", "Paisley", "Camouflage"), listOf("Leopard", "Tropical", "Jacquard"))
 * Output: "Pattern not found!"
 */
fun findMatchingPattern(patterns: List<String>, searchList: List<String>): String {
/**
 * A fashion designer has a list of clothing patterns and they want to find a specific pattern 
 * from the given list. Write a function that takes a list of patterns and a search list as inputs. 
 * The function should return the pattern found from the search list, or "Pattern not found!" if 
 * the pattern is not present in the search list.
 *
 * Examples:
 * ---------
 * findMatchingPattern(listOf("Floral", "Stripes", "Polka dots", "Plaid"), listOf("Geometric", "Floral", "Stripes"))
 * Output: "Floral"
 *
 * findMatchingPattern(listOf("Solid color", "Checked", "Houndstooth", "Tartan"), listOf("Plaid", "Houndstooth", "Jacquard"))
 * Output: "Houndstooth"
 * 
 * findMatchingPattern(listOf("Animal print", "Argyle", "Paisley", "Camouflage"), listOf("Leopard", "Tropical", "Jacquard"))
 * Output: "Pattern not found!"
 */
fun findMatchingPattern(patterns: List<String>, searchList: List<String>): String {

    for (pattern in patterns) {
        for (item in searchList) {
            if (pattern == item) {
                return pattern
            }
        }
    }
    return "Pattern not found!"
}