class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: G = None
        self.u: H = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: C = None
        self.s: F = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: H = None
        self.z: E = None
        self.v: G = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: C = None
        self.s: F = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: H = None
        self.z: E = None
        self.v: G = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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