class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: A = None
        self.w: E = None
        self.y: A = None
        self.t: A = None
        self.p: E = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: E = None
        self.w: B = None
        self.s: G = None
        self.p: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.x: C = None
        self.s: D = None
        self.p: A = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: C = None
        self.x: F = None
        self.o: A = None
        self.txt = txt

b = A("b")
m = B("m")
i = C("i")
h = D("h")
c = E("c")
e = F("e")
n = G("n")
k = H("k")
j = G("j")

b.y = m
m.o = h
m.y = c
m.r = k
i.q = h
i.w = b
i.s = k
i.u = k
i.v = k
i.t = j
i.z = j
i.x = m
h.s = n
h.x = b
h.y = b
h.t = b
h.w = c
h.p = c
h.z = i
c.y = h
c.q = h
c.o = h
c.z = i
c.v = e
e.o = h
e.v = c
e.w = m
e.s = n
e.x = n
e.p = b
n.t = b
n.p = b
n.q = c
n.x = i
n.s = h
n.r = e
k.q = e
k.x = e
k.w = i
k.o = b
j.t = b
j.p = b
j.q = c
j.x = i
j.s = h
j.r = e
assert e.w.r.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: A = None
        self.w: E = None
        self.y: A = None
        self.t: A = None
        self.p: E = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: E = None
        self.w: B = None
        self.s: G = None
        self.p: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.x: C = None
        self.s: D = None
        self.p: A = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: C = None
        self.x: F = None
        self.o: A = None
        self.txt = txt

b = A("b")
m = B("m")
i = C("i")
h = D("h")
c = E("c")
e = F("e")
n = G("n")
k = H("k")
j = G("j")

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