import time
def clock():
try:
while True:
current_time = time.strftime('%I:%M:%S' )
print(current_time, end='\r', flush=True)
time.sleep(1)
except KeyboardInterrupt:
print('\nGoodbye, my friend.')
clock()