# coding: utf-8 print(input().replace('tree', 'forest'))