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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.o: E = None
        self.p: E = None
        self.z: F = None
        self.q: E = None
        self.t: D = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: H = None
        self.r: C = None
        self.x: B = None
        self.txt = txt

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

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

j = A("j")
a = B("a")
m = C("m")
g = D("g")
k = E("k")
c = F("c")
i = G("i")
e = H("e")
h = H("h")
d = D("d")

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: G = None
        self.o: E = None
        self.p: E = None
        self.z: F = None
        self.q: E = None
        self.t: D = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: H = None
        self.r: C = None
        self.x: B = None
        self.txt = txt

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

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

j = A("j")
a = B("a")
m = C("m")
g = D("g")
k = E("k")
c = F("c")
i = G("i")
e = H("e")
h = H("h")
d = D("d")

j.p = d
j.v = d
j.z = g
j.y = m
j.t = c
j.o = e
j.w = k
j.x = a
a.t = g
a.y = i
m.w = j
m.u = i
m.v = i
m.o = k
m.p = k
m.q = k
m.z = c
m.t = d
g.x = j
g.p = c
g.r = m
k.r = m
c.o = j
c.t = h
c.r = m
c.x = a
i.x = k
i.p = h
i.w = h
i.t = d
e.q = j
e.p = j
e.y = j
e.w = k
e.o = h
e.t = h
e.u = m
e.x = g
h.q = j
h.p = j
h.y = j
h.w = k
h.o = e
h.t = e
h.u = m
h.x = g
d.x = j
d.p = c
d.r = m
assert h.t.x.p.r.w.txt == "j"