This question is specifically in regards to using generator statements and stems from this program from Udacity's design of computer programs course:

designed to solve this puzzle <https://en.wikipedia.org/wiki/Zebra_Puzzle>
this img may be more readable <http://imgur.com/klkaSry>

```
import itertools

def zebra_puzzle():

    houses = [first, _, middle, _,_] = [1,2,3,4,5]
    orderings = list(itertools.permutations(houses))
    return next((WATER, ZEBRA)

        for (red, green, ivory, yellow, blue) in orderings
        if im_right(green,ivory)

        for (Englishman, Spaniard, Ukranian, Japanese, Norwegian) in orderings
        if Englishman is red
        if first is Norwegian
        if nextto(Norwegian, blue)

        for (dog, snails, fox, horse, ZEBRA) in orderings
        if Spaniard is dog

        for (coffee, tea, milk, oj, WATER) in orderings
        if coffee is green
        if Ukranian is tea
        if middle is milk

        for (OldGold, Kools, Chesterfields, LuckyStrike, Parliaments) in orderings
        if OldGold is snails
        if Kools is yellow
        if nextto(Chesterfields, fox)
        if nextto(Kools,horse)
        if LuckyStrike is oj
        if Parliaments is Japanese
        )

def im_right(h1,h2):
    return h1-h2 == 1

def nextto(h1,h2):
    return abs(h1-h2) == 1

def main():
    zebra_puzzle()

if __name__ == '__main__':
    main()

```

I keep running into problems in Project Euler where this would be useful but I end having to use normal nested loops.

also, is this question ok?