(S (S (NP (BASENP (NNP Estonia) (CC and) (NNP Latvia)) (PRN (COMMA ,) (SBAR (WHNP (WDT which)) (S (VP (VBD were) (VP (VP (VBN occupied) (PP (IN by) (BASENP (DT the) (NNP Soviet) (NNP Union)))) (PP (IN until) (BASENP (DT the) (JJ early) (NNS 1990s))))))) (COMMA ,))) (VP (VP (VBD joined) (BASENP (DT the) (NNP European) (NNP Union))) (PP (IN in) (BASENP (NN 2004))))) (PERIOD .))