/**
 * Checks if there is a power supply to each circuit.
 *
 * @param p1 Boolean expression indicating if circuit 1 has power.
 * @param p2 Boolean expression indicating if circuit 2 has power.
 * @param p3 Boolean expression indicating if circuit 3 has power.
 * @return True if all circuits have power, False otherwise.
 */
fun checkPower(p1: Boolean, p2: Boolean, p3: Boolean): Boolean {

    // Complete the code below
    if (p1) {
        if (p2) {
            if (p3) {
                return true
            } else {
                return false
            }
        } else {
            return false
        }
    } else {
        return false
    }
}
/**
 * Checks if there is a power supply to each circuit.
 *
 * @param p1 Boolean expression indicating if circuit 1 has power.
 * @param p2 Boolean expression indicating if circuit 2 has power.
 * @param p3 Boolean expression indicating if circuit 3 has power.
 * @return True if all circuits have power, False otherwise.
 */
fun checkPower(p1: Boolean, p2: Boolean, p3: Boolean): Boolean {
/**
 * Checks if there is a power supply to each circuit.
 *
 * @param p1 Boolean expression indicating if circuit 1 has power.
 * @param p2 Boolean expression indicating if circuit 2 has power.
 * @param p3 Boolean expression indicating if circuit 3 has power.
 * @return True if all circuits have power, False otherwise.
 */
fun checkPower(p1: Boolean, p2: Boolean, p3: Boolean): Boolean {

    // Complete the code below
    if (p1) {
        if (p2) {
            if (p3) {
                return true
            } else {
                return false
            }
        } else {
            return false
        }
    } else {
        return false
    }
}