Many had to leave their birthplaces, fleeing to Lesvos, Chios, and Samos, the Greek-ruled islands just offshore.
( Many ( ( had ( to ( ( leave ( ( ( ( ( their birthplaces ) , ) ( fleeing ( to ( Lesvos ( , ( Chios ( , ( and Samos ) ) ) ) ) ) ) ) , ) ( ( the ( Greek-ruled islands ) ) just ) ) ) offshore ) ) ) . ) )
(ROOT (S (NP (DT Many)) (VP (VBD had) (S (VP (TO to) (VP (VB leave) (NP (NP (PRP$ their) (NNS birthplaces)) (, ,) (ADJP (JJ fleeing) (PP (TO to) (NP (NNP Lesvos) (, ,) (NNP Chios) (, ,) (CC and) (NNP Samos)))) (, ,) (ADVP (NP (DT the) (JJ Greek-ruled) (NNS islands)) (RB just))) (ADVP (RB offshore)))))) (. .)))
Everyone was able to remain in their homeland. 
( Everyone ( ( was ( able ( to ( remain ( in ( their homeland ) ) ) ) ) ) . ) )
(ROOT (S (NP (NN Everyone)) (VP (VBD was) (ADJP (JJ able) (S (VP (TO to) (VP (VB remain) (PP (IN in) (NP (PRP$ their) (NN homeland)))))))) (. .)))