class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: C = None
        self.r: D = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: C = None
        self.x: D = None
        self.p: E = None
        self.r: D = None
        self.txt = txt

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

e = A("e")
g = B("g")
c = C("c")
a = D("a")
f = E("f")
d = B("d")
b = D("b")
n = E("n")
i = B("i")
k = D("k")

e.u = b
e.q = c
e.r = k
e.w = n
g.w = b
g.q = i
g.z = c
g.x = e
c.x = n
a.w = e
a.t = c
a.x = b
a.r = b
a.p = n
f.z = n
f.v = n
f.t = c
d.w = k
d.q = g
d.z = c
d.x = e
b.w = e
b.t = c
b.x = k
b.p = f
b.r = a
n.z = f
n.v = f
n.t = c
i.w = b
i.q = g
i.z = c
i.x = e
k.w = e
k.t = c
k.x = a
k.r = a
k.p = f
assert e.w.t.x.v.z.v.t.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: C = None
        self.r: D = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: C = None
        self.x: D = None
        self.p: E = None
        self.r: D = None
        self.txt = txt

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

e = A("e")
g = B("g")
c = C("c")
a = D("a")
f = E("f")
d = B("d")
b = D("b")
n = E("n")
i = B("i")
k = D("k")

e.u = b
e.q = c
e.r = k
e.w = n
g.w = b
g.q = i
g.z = c
g.x = e
c.x = n
a.w = e
a.t = c
a.x = b
a.r = b
a.p = n
f.z = n
f.v = n
f.t = c
d.w = k
d.q = g
d.z = c
d.x = e
b.w = e
b.t = c
b.x = k
b.p = f
b.r = a
n.z = f
n.v = f
n.t = c
i.w = b
i.q = g
i.z = c
i.x = e
k.w = e
k.t = c
k.x = a
k.r = a
k.p = f
assert e.w.t.x.v.z.v.t.x.v.txt == "f"