class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: H = None
        self.v: B = None
        self.u: E = None
        self.r: H = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: H = None
        self.w: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: H = None
        self.w: D = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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