void setup() {
pinMode(8, INPUT);
pinMode(9, INPUT);
pinMode(10, INPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
}

void loop() {
int a = digitalRead(8);
int b = digitalRead(9);
int c = digitalRead(10);
if (a==1){digitalWrite(4, HIGH);
digitalWrite(5, HIGH);}
if (b==1){digitalWrite(6, HIGH);
digitalWrite(7, HIGH);}
else if (c==1){digitalWrite(5, LOW);
digitalWrite(6, LOW);}
}