#!/ect/python
import RPi.GPIO as GPIO
import time

z = 0.009 #

GPIO.setmode(GPIO.BCM)
GPIO.setup(12, GPIO.OUT)
GPIO.setup(20, GPIO.OUT)
GPIO.setup(16, GPIO.OUT)
GPIO.setup(21, GPIO.OUT)
GPIO.setup(26, GPIO.OUT)
GPIO.setup(19, GPIO.OUT)
GPIO.setup(13, GPIO.OUT)
GPIO.setup(6, GPIO.OUT)
GPIO.setup(5, GPIO.OUT)
GPIO.setup(0, GPIO.OUT)
GPIO.setup(11, GPIO.OUT)
GPIO.setup(9, GPIO.OUT)
GPIO.setup(10, GPIO.OUT)
GPIO.setup(22, GPIO.OUT)
GPIO.setup(27, GPIO.OUT)
GPIO.setup(3,GPIO.IN)

while True :
    o=GPIO.input(3)
    if (o==False):
        GPIO.output(27,GPIO.LOW)
        GPIO.output(21,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(21,GPIO.LOW)
        GPIO.output(20,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(20,GPIO.LOW)
        GPIO.output(16,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(16,GPIO.LOW)
        GPIO.output(12,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(12,GPIO.LOW)
        GPIO.output(26,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(26,GPIO.LOW)
        GPIO.output(19,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(19,GPIO.LOW)
        GPIO.output(13,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(13,GPIO.LOW)
        GPIO.output(6,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(6,GPIO.LOW)
        GPIO.output(5,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(5,GPIO.LOW)
        GPIO.output(0,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(0,GPIO.LOW)
        GPIO.output(11,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(11,GPIO.LOW)
        GPIO.output(9,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(9,GPIO.LOW)
        GPIO.output(10,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(10,GPIO.LOW)
        GPIO.output(22,GPIO.HIGH)
        time.sleep(z)
        GPIO.output(22,GPIO.LOW)
        GPIO.output(27,GPIO.HIGH)
        time.sleep(z)
GPIO.cleanup()
