class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: C = None
        self.x: E = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: G = None
        self.r: D = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: G = None
        self.z: C = None
        self.r: H = None
        self.w: H = None
        self.v: D = None
        self.s: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: D = None
        self.o: G = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

m = A("m")
e = B("e")
c = C("c")
a = D("a")
h = E("h")
j = F("j")
n = G("n")
f = H("f")
b = G("b")
d = F("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: G = None
        self.r: D = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: G = None
        self.z: C = None
        self.r: H = None
        self.w: H = None
        self.v: D = None
        self.s: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: D = None
        self.o: G = None
        self.z: A = None
        self.q: B = None
        self.txt = txt

m = A("m")
e = B("e")
c = C("c")
a = D("a")
h = E("h")
j = F("j")
n = G("n")
f = H("f")
b = G("b")
d = F("d")

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