class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: E = None
        self.v: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.x: C = None
        self.y: D = None
        self.o: C = None
        self.txt = txt

a = A("a")
g = B("g")
j = C("j")
f = D("f")
n = E("n")
m = B("m")
d = A("d")
k = A("k")

a.t = f
a.z = n
a.v = j
g.z = k
g.o = k
j.y = f
j.v = f
j.t = m
f.x = n
f.o = d
n.u = f
n.w = f
n.y = f
n.x = j
n.o = j
m.z = d
m.o = a
d.t = f
d.z = n
d.v = j
k.t = f
k.z = n
k.v = j
assert d.z.w.o.t.o.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: E = None
        self.v: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.x: C = None
        self.y: D = None
        self.o: C = None
        self.txt = txt

a = A("a")
g = B("g")
j = C("j")
f = D("f")
n = E("n")
m = B("m")
d = A("d")
k = A("k")

a.t = f
a.z = n
a.v = j
g.z = k
g.o = k
j.y = f
j.v = f
j.t = m
f.x = n
f.o = d
n.u = f
n.w = f
n.y = f
n.x = j
n.o = j
m.z = d
m.o = a
d.t = f
d.z = n
d.v = j
k.t = f
k.z = n
k.v = j
assert d.z.w.o.t.o.v.v.txt == "f"