from time import sleep
import keyboard

for i in range(4):
    keyboard.press_and_release('g')
    keyboard.press_and_release('q')
