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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.u: B = None
        self.y: A = None
        self.r: C = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: C = None
        self.s: A = None
        self.q: C = None
        self.txt = txt

h = A("h")
n = B("n")
c = C("c")
g = D("g")
m = E("m")
a = F("a")
l = G("l")
j = H("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.u: B = None
        self.y: A = None
        self.r: C = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: C = None
        self.s: A = None
        self.q: C = None
        self.txt = txt

h = A("h")
n = B("n")
c = C("c")
g = D("g")
m = E("m")
a = F("a")
l = G("l")
j = H("j")

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