Question: What is the character role of  Wyatt Earp (the one that has Adam Baldwin as a cast member) which features Michael Madsen (the one that is a cast member of Scary Movie 4) as a cast member?
Choices:
Romeo
Zefram Cochrane
Batgirl
Ghost Rider
Dory
Dr. Nick
Virgil Earp
Ezra Kramer
Guy Banister
Yoda
Answer: Virgil Earp
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "Wyatt Earp" . ?e_1 <cast_member> ?e_3 . ?e_3 <pred:name> "Adam Baldwin" . ?e_2 <pred:name> "Michael Madsen" . ?e_4 <cast_member> ?e_2 . ?e_4 <pred:name> "Scary Movie 4" . ?e_1 <cast_member> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <cast_member> ; <pred:fact_t> ?e_2 ] <character_role> ?qpv .  }
Program:
function: Find
inputs: Adam Baldwin
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Wyatt Earp
function: And
dependencies: 1
2
function: Find
inputs: Scary Movie 4
function: Relate
dependencies: 4
inputs: cast member
forward
function: Find
inputs: Michael Madsen
function: And
dependencies: 5
6
function: QueryRelationQualifier
dependencies: 3
7
inputs: cast member
character role