On a problem of J. F. Ritt