Solves first task in TextFiles