[MAIN] Variation of Djikstra P1