class A:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.t: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

n = A("n")
f = B("f")
m = C("m")
j = B("j")
i = C("i")
e = B("e")
k = A("k")
l = A("l")

n.o = l
n.q = e
n.t = k
f.s = l
m.x = k
m.z = f
m.y = e
j.s = n
i.x = k
i.z = f
i.y = j
e.s = n
k.o = n
k.t = n
k.q = f
l.o = n
l.t = n
l.q = e
assert j.s.q.s.o.q.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.t: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

n = A("n")
f = B("f")
m = C("m")
j = B("j")
i = C("i")
e = B("e")
k = A("k")
l = A("l")

n.o = l
n.q = e
n.t = k
f.s = l
m.x = k
m.z = f
m.y = e
j.s = n
i.x = k
i.z = f
i.y = j
e.s = n
k.o = n
k.t = n
k.q = f
l.o = n
l.t = n
l.q = e
assert j.s.q.s.o.q.s.o.txt == "l"