class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.txt = txt

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

b = A("b")
e = B("e")
l = C("l")
k = A("k")
a = B("a")
d = B("d")

b.v = k
b.o = k
e.o = d
e.r = l
l.t = d
l.o = k
l.u = a
k.v = b
k.o = b
a.o = d
a.r = l
d.o = a
d.r = l
assert e.o.r.u.r.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.txt = txt

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

b = A("b")
e = B("e")
l = C("l")
k = A("k")
a = B("a")
d = B("d")

b.v = k
b.o = k
e.o = d
e.r = l
l.t = d
l.o = k
l.u = a
k.v = b
k.o = b
a.o = d
a.r = l
d.o = a
d.r = l
assert e.o.r.u.r.t.o.txt == "a"