while True:
    msg = input('Podaj wiadomosć: ')
    if msg == 'exit':
        break
    print(f'Wiadomość {msg}')

print('Wyszedłem z pętli')