Collinear solution to the general relativistic three-body problem