ChatGPT - Recursive terminal logic