input: Write a function to generate a random password of length 8 characters, which contains at least one of each character type (lowercase, uppercase, digits, special characters). If the password is generated successfully, return the password as a string.
  assert generate_random_password()=="A3b!tYz8"
  assert generate_random_password()=="Z9@qWp1L"
  assert generate_random_password()=="M5o$Jk7R"
  assert generate_random_password()=="X2v#Nm6Q"
  assert generate_random_password()=="P4s&Bc9F"
output: import random
  import string
  
  def generate_random_password():
      while True:
          password = ''.join(random.choices(string.ascii_letters + string.digits + string.punctuation, k=8))
          if (any(c.islower() for c in password) and
              any(c.isupper() for c in password) and
              any(c.isdigit() for c in password) and
              any(c in string.punctuation for c in password)):
              return password