When was John F. Kennedy the United States representative?
SELECT ?value WHERE { wd:Q9696 p:P39 ?s . ?s ps:P39 wd:Q13218630 . ?s pq:P582 ?value}
john f. kennedy: Q9696 united states representative: Q13218630