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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: H = None
        self.p: C = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: E = None
        self.o: E = None
        self.t: G = None
        self.s: D = None
        self.u: E = None
        self.txt = txt

m = A("m")
d = B("d")
e = C("e")
b = D("b")
a = E("a")
l = F("l")
c = G("c")
g = H("g")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: H = None
        self.p: C = None
        self.s: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: E = None
        self.o: E = None
        self.t: G = None
        self.s: D = None
        self.u: E = None
        self.txt = txt

m = A("m")
d = B("d")
e = C("e")
b = D("b")
a = E("a")
l = F("l")
c = G("c")
g = H("g")
j = H("j")

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