/**
 * This function designs a dress by combining different patterns to create a unique look.
 *
 * @param length The length of the dress.
 * @param patterns A list containing different patterns to be combined.
 * @return The final design of the dress.
 *
 * Example:
 * The length of the dress is 5 and the patterns are ['A', 'B', 'C']. The final design would be 'ABABA'.
 */
fun designDress(length: Int, patterns: List<String>): String {

    // Repeat patterns based on the length of the dress
    val repeatedPatterns = mutableListOf<String>()
    for (pattern in patterns) {
        repeatedPatterns.add(pattern.repeat(length))
    }

    // Concatenate all the repeated patterns
    var finalDesign = ""
    for (pattern in repeatedPatterns) {
        finalDesign += pattern
    }

    return finalDesign
}
/**
 * This function designs a dress by combining different patterns to create a unique look.
 *
 * @param length The length of the dress.
 * @param patterns A list containing different patterns to be combined.
 * @return The final design of the dress.
 *
 * Example:
 * The length of the dress is 5 and the patterns are ['A', 'B', 'C']. The final design would be 'ABABA'.
 */
fun designDress(length: Int, patterns: List<String>): String {
/**
 * This function designs a dress by combining different patterns to create a unique look.
 *
 * @param length The length of the dress.
 * @param patterns A list containing different patterns to be combined.
 * @return The final design of the dress.
 *
 * Example:
 * The length of the dress is 5 and the patterns are ['A', 'B', 'C']. The final design would be 'ABABA'.
 */
fun designDress(length: Int, patterns: List<String>): String {

    // Repeat patterns based on the length of the dress
    val repeatedPatterns = mutableListOf<String>()
    for (pattern in patterns) {
        repeatedPatterns.add(pattern.repeat(length))
    }

    // Concatenate all the repeated patterns
    var finalDesign = ""
    for (pattern in repeatedPatterns) {
        finalDesign += pattern
    }

    return finalDesign
}