#!/usr/bin/env python

import socket

try :
    result = socket.gethostbyaddr("8.8.8.8")
    print("Nazwa domeny:", result[0])
    print("Adresy IP:")
    for item in result[2]:
        print(" " + item)
except socket.error as e:
    print("Błąd odwzorowania:", e)