Field theory of relativistic strings. I. Trees