I believe your syntax problem is related to let. Except for the top-level code (external module level), letmust follow in.
There are many other problems with this code, but maybe this will allow you to find the following problem :-)
A few notes:
OCaml . , first . . ( , ) .
Pervasives . "". print_string .
print_newline . . ( , .)