The origin of the first and third generation fermion massesin a technicolor scenario