def p_words(p):
    """words : words WHITESPACE WORD
             | WORD"""
    if len(p) == 4:
        p[0] = p[1] + p[2] + p[3]
    elif len(p) == 2:
        p[0] = p[1]
    else:
        raise Exception('unexpected length %s' % len(p))
