try:
    text = input('Enter something --> ')
except KeyboardInterrupt:   # Unix: ^C & Windows: ^C
    print('\nYou cancelled the operation.')
except EOFError:            # Unix: ^D & Windows: ^Z+↵
    print('\nWhy did you do an EOF on me?')
else:                       # něco jsme napsali a odentrovali
    print(f'You entered "{text}".')
finally:                    # vykoná se vždy při opouštění bloku příkazu 'try'
    print('Completed.')
