Getting out of labirynth containing teleports with A*