class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: E = None
        self.q: C = None
        self.v: H = None
        self.z: G = None
        self.o: H = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: H = None
        self.txt = txt

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

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

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