(S (S (S (BASENP (NNP South) (NNP Korea)) (VP (VBD had) (VP (VBN been) (VP (VP (VBG taking) (NP (BASENP (NN part)) (PP (IN in) (NP (BASENP (JJ annual) (NN military) (NNS exercises)) (PP (IN with) (BASENP (DT the) (NNP U.S.))))))) (COMMA ,) (PP (IN off) (NP (BASENP (DT the) (NN island) (POS 's)) (BASENP (JJ west) (NN coast)))))))) (SBAR (WHADVP (WRB when)) (S (BASENP (DT the) (NN attack)) (VP (VBD occurred))))) (PERIOD .))