Algorithm which produce output depends on input behaviour