input: Write a function to simulate a simple ATM machine by implementing the Account and ATM classes, which manage account creation, deposits, withdrawals, and balance checks. The function should be able to create accounts, deposit and withdraw money, and print account balances. If the given name or amount is invalid, the function should handle these cases gracefully.
  
  def simulate_atm():
      account_list = ATM()
      account_list.createAccount("Alice", 1000)
      account_list.createAccount("Bob", 500)
      account_list.deposit("Alice", 200)
      account_list.withdrawal("Bob", 100)
      account_list.printBalance("Alice")
      account_list.printBalance("Bob")
      assert account_list.accounts[0].balance == 1200
      assert account_list.accounts[1].balance == 400
output: def simulate_atm():
      account_list = ATM()
      account_list.createAccount("Alice", 1000)
      account_list.createAccount("Bob", 500)
      account_list.deposit("Alice", 200)
      account_list.withdrawal("Bob", 100)
      account_list.printBalance("Alice")
      account_list.printBalance("Bob")