# Simple Contact Book

contact_book = {}

def add_contact(name, phone, email):
    contact_book[name] = {"phone": phone, "email": email}

def remove_contact(name):
    if name in contact_book:
        del contact_book[name]

def update_contact(name, phone, email):
    if name in contact_book:
        contact_book[name] = {"phone": phone, "email": email}

def get_contact_details(name):
    return contact_book.get(name, "Contact not found")

def list_all_contacts():
    for name, details in contact_book.items():
        print(f"Name: {name}, Phone: {details['phone']}, Email: {details['email']}")

# Example usage
add_contact("John Doe", "1234567890", "johndoe@example.com")
update_contact("John Doe", "0987654321", "john@example.com")
print(get_contact_details("John Doe"))  # Output: {'phone': '0987654321', 'email': 'john@example.com'}
list_all_contacts()
