class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: C = None
        self.u: G = None
        self.o: E = None
        self.y: G = None
        self.p: F = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.t: B = None
        self.q: F = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: F = None
        self.v: C = None
        self.o: G = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: C = None
        self.p: G = None
        self.x: G = None
        self.z: B = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: F = None
        self.p: C = None
        self.u: G = None
        self.txt = txt

m = A("m")
g = B("g")
f = C("f")
i = D("i")
k = E("k")
b = F("b")
e = G("e")
j = H("j")
d = G("d")
n = D("n")

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: D = None
        self.t: B = None
        self.q: F = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: F = None
        self.v: C = None
        self.o: G = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: C = None
        self.p: G = None
        self.x: G = None
        self.z: B = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: F = None
        self.p: C = None
        self.u: G = None
        self.txt = txt

m = A("m")
g = B("g")
f = C("f")
i = D("i")
k = E("k")
b = F("b")
e = G("e")
j = H("j")
d = G("d")
n = D("n")

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