question: what country is bordered by poland and germany on the north side?
#1 return country 
#2 return the  north side of #1 
#3 return poland 
#4 return germany 
#5 return #1 where  #2 is bordered by #3 
#6 return #1 where  #2 is bordered by #4 
#7 return #1 in  both  #5 and #6