input: Design a Python program to simulate a simple ATM machine.
output:     
  class ATM:
      def __init__(self, balance=0):
          self.balance = balance
  
      def check_balance(self):
          return self.balance
  
      def deposit(self, amount):
          if amount > 0:
              self.balance += amount
              return f"Deposited ${amount}. New balance: ${self.balance}"
          else:
              return "Invalid deposit amount."
  
      def withdraw(self, amount):
          if amount > 0 and amount <= self.balance:
              self.balance -= amount
              return f"Withdrew ${amount}. New balance: ${self.balance}"
          else:
              return "Invalid withdrawal amount or insufficient funds."
  
  # Example usage:
  # atm = ATM(1000)
  # print(atm.check_balance())  # Output: 1000
  # print(atm.deposit(500))     # Output: Deposited $500. New balance: $1500
  # print(atm.withdraw(200))    # Output: Withdrew $200. New balance: $1300
  # print(atm.withdraw(1500))   # Output: Invalid withdrawal amount or insufficient funds.
  