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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: A = None
        self.q: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: A = None
        self.o: F = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: A = None
        self.q: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: A = None
        self.o: F = None
        self.t: B = None
        self.q: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

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

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