class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: F = None
        self.o: A = None
        self.s: A = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: B = None
        self.o: A = None
        self.t: F = None
        self.q: E = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: C = None
        self.z: D = None
        self.p: D = None
        self.u: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: F = None
        self.o: A = None
        self.s: A = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: B = None
        self.o: A = None
        self.t: F = None
        self.q: E = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: C = None
        self.z: D = None
        self.p: D = None
        self.u: C = None
        self.txt = txt

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

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