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

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

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

d = A("d")
n = B("n")
i = C("i")
e = A("e")
l = B("l")
f = A("f")
m = C("m")
b = C("b")

d.v = n
d.y = b
n.t = l
n.u = d
n.x = e
i.o = m
i.t = b
e.v = n
e.y = b
l.t = n
l.u = f
l.x = e
f.v = n
f.y = m
m.o = i
m.t = b
b.o = i
b.t = i
assert f.v.t.u.v.u.y.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: C = None
        self.txt = txt

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

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

d = A("d")
n = B("n")
i = C("i")
e = A("e")
l = B("l")
f = A("f")
m = C("m")
b = C("b")

d.v = n
d.y = b
n.t = l
n.u = d
n.x = e
i.o = m
i.t = b
e.v = n
e.y = b
l.t = n
l.u = f
l.x = e
f.v = n
f.y = m
m.o = i
m.t = b
b.o = i
b.t = i
assert f.v.t.u.v.u.y.t.o.txt == "m"