from random import*

def salle1():
    a = randint(0, 1)
    if a == 0:
        return 2
    else:
        return 4

def salle2():






def salle4():








def jeu():
    s = 1
    while s != 3 and s != 5 :
        if s == 1:
            s = salle1()
        if ... :
            ...
        if ... :
            ...
    if s == 5 :
        return 1
    else :
        return ...





