(S (S (BASENP (NNP Alabama) (NNP Gov.) (NNP Bob) (NNP Riley)) (VP (VP (VBD beat) (PRT (RP back))) (NP (BASENP (DT a) (JJ Republican) (NN primary) (NN challenge)) (PP (IN from) (NP (BASENP (NNP Roy) (NNP Moore)) (COMMA ,) (NP (BASENP (DT the) (JJ former) (NN judge)) (SBAR (WHNP (WP who)) (S (VP (VBD tried) (S (VP (TO to) (VP (VP (VP (VB put) (PRT (RP up))) (BASENP (DT a) (NNP Ten) (NNPS Commandments) (NN monument))) (PP (IN in) (BASENP (PRPD his) (NN courthouse))))))))))))))) (PERIOD .))