Help Me please on Kelvintaph Crusader

while (1==1):
    friends = self.findFriends()
    for friend in friends:
        enemy = friend.findNearest(friend.findEnemies())
        witch = self.findByType("witch")
        if enemy:
            self.command(friend, "attack", enemy)
            self.command(friend, "attack", enemy)
        else:
             exit = {'x':78, 'y':40}
             self.command(friend, "move", exit)
        break
self.move({'x':36, 'y':16})
self.say("hi")
self.move({'x':1, 'y':13})
self.move({'x':69, 'y':16})
self.say("bye")
self.say("catapult")
self.move({'x':2,'y':15})
self.move({'x':78, 'y':14})

it doesn’t work. i don’t know how to target the witch and my charecter freezed anfd it said i have infinite loop